-
Notifications
You must be signed in to change notification settings - Fork 881
Support exemplars in Metrics #2527
Description
First stable release (1.9.0)
-
SDK default behavior will be
AlwaysOff. The spec says the defaultSHOULDbeTraceBased. We decided to deviate from this due to performance concerns whenExemplars are enabled: [sdk-metrics] Turn exemplars on by default in prerelease builds #5545 -
Expose APIs covered by the Exemplar diagnostic:
This will allow users to enable
Exemplars eitherAlwaysOnorTraceBasedfor all metrics. -
Add an environment variable for turning on
Exemplars specifically for histograms:We feel
Exemplars are most useful when combined with histograms. The current spec design is all-or-nothing. Due to the performance concerns, we have decided to expose an experiment mechanism for enablingExemplars for histograms only. The plan is for this to be a temporary thing while we work to improve the spec to allow for this scenario via a stable API. -
Tasks:
- Remove ExemplarFilter API: Exemplar - remove ExemplarFilter API #5333
- Give ExemplarReservoir + View API its own diagnostic: Exemplar - expose ExemplarReservoir and enable View based config #5334, [sdk-metrics] ExemplarReservoir dedicated diagnostic and custom ExemplarReservoir support #5558
- Add an experimental envvar for enabling exemplars for histograms: [sdk-metrics] Add experimental envvar for setting ExemplarFilter for histograms #5611
- Remove experimental api decorations & update OTEL1002 diagnostic: [sdk-metrics] Expose Exemplars stable #5607
- Add docs which show how to use the view api portion: [docs-metrics] Customer ExemplarReservoir and View API configuration #5624
- Add example which shows how to implement a custom reservoir: [docs-metrics] Customer ExemplarReservoir and View API configuration #5624
Future release
-
Propose spec changes to make it easier to enable
Exemplars for specific metrics: [metrics] Allow setting ExemplarFilter via View API opentelemetry-specification#4014 -
Propose spec changes to make it easier to enable
Exemplars for specific instrument types: TODO -
Expose APIs covered by the ExemplarReservoir diagnostic:
We felt the use case for building custom
ExemplarReservoirs is unclear. We want to gather feedback before exposing something.