You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`OTEL_METRICS_EXEMPLAR_FILTER`| Sets the default `ExemplarFilter` to use for all metrics. | Added in `1.9.0`|
409
+
|`OTEL_DOTNET_EXPERIMENTAL_METRICS_EXEMPLAR_FILTER_HISTOGRAMS`| Sets the default `ExemplarFilter` to use for histogram metrics. If set `OTEL_DOTNET_EXPERIMENTAL_METRICS_EXEMPLAR_FILTER_HISTOGRAMS` takes precedence over `OTEL_METRICS_EXEMPLAR_FILTER` for histogram metrics. | Experimental key (may be removed or changed in the future). Added in `1.9.0`|
410
+
411
+
Allowed values:
412
+
413
+
*`always_off`: Equivalent to `ExemplarFilterType.AlwaysOff`
414
+
*`always_on`: Equivalent to `ExemplarFilterType.AlwaysOn`
415
+
*`trace_based`: Equivalent to `ExemplarFilterType.TraceBased`
416
+
385
417
#### ExemplarReservoir
386
418
387
419
`ExemplarReservoir` receives the measurements sampled by the `ExemplarFilter`
@@ -398,7 +430,8 @@ metrics except Histograms with buckets. It has a fixed reservoir pool, and
398
430
implements the equivalent of [naive
399
431
reservoir](https://en.wikipedia.org/wiki/Reservoir_sampling). The reservoir pool
400
432
size (currently defaulting to 1) determines the maximum number of exemplars
401
-
stored.
433
+
stored. Exponential histograms use a `SimpleFixedSizeExemplarReservoir` with a
434
+
pool size equal to the number of buckets up to a max of `20`.
402
435
403
436
> [!NOTE]
404
437
> Currently there is no ability to change or configure `ExemplarReservoir`.
OpenTelemetrySdkEventSource.Log.MeterProviderSdkEvent($"Exemplar filter configuration was found but the value '{configValue}' is invalid and will be ignored.");
513
+
return;
514
+
}
515
+
516
+
this.ExemplarFilter=exemplarFilter;
517
+
518
+
OpenTelemetrySdkEventSource.Log.MeterProviderSdkEvent($"Exemplar filter set to '{exemplarFilter}' from configuration.");
OpenTelemetrySdkEventSource.Log.MeterProviderSdkEvent($"Exemplar filter histogram configuration was found but the value '{configValue}' is invalid and will be ignored.");
533
+
return;
534
+
}
535
+
536
+
this.ExemplarFilterForHistograms=exemplarFilter;
537
+
538
+
OpenTelemetrySdkEventSource.Log.MeterProviderSdkEvent($"Exemplar filter for histograms set to '{exemplarFilter}' from configuration.");
OpenTelemetrySdkEventSource.Log.MeterProviderSdkEvent($"Exemplar filter configuration was found but the value '{configValue}' is invalid and will be ignored.");
518
-
return;
519
-
}
520
-
521
-
this.ExemplarFilter=exemplarFilter;
522
560
523
-
OpenTelemetrySdkEventSource.Log.MeterProviderSdkEvent($"Exemplar filter set to '{exemplarFilter}' from configuration.");
0 commit comments