-
Notifications
You must be signed in to change notification settings - Fork 772
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[sdk-metrics] Add experimental envvar for setting ExemplarFilter for histograms #5611
[sdk-metrics] Add experimental envvar for setting ExemplarFilter for histograms #5611
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5611 +/- ##
==========================================
+ Coverage 83.38% 85.70% +2.31%
==========================================
Files 297 254 -43
Lines 12531 11016 -1515
==========================================
- Hits 10449 9441 -1008
+ Misses 2082 1575 -507
Flags with carried forward coverage won't be shown. Click here to find out more.
|
| Environment variable | Description | Notes | | ||
| -------------------------- | -------------------------------------------------- |-------| | ||
| `OTEL_METRICS_EXEMPLAR_FILTER` | Sets the default `ExemplarFilter` to use for all metrics. | Added in `1.9.0` | | ||
| `OTEL_DOTNET_EXPERIMENTAL_METRICS_EXEMPLAR_FILTER_HISTOGRAMS` | Sets the default `ExemplarFilter` to use for histogram metrics. If not set than `OTEL_METRICS_EXEMPLAR_FILTER` also applies to histograms. | Experimental key (may be removed or changed in the future). Added in `1.9.0` | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| `OTEL_DOTNET_EXPERIMENTAL_METRICS_EXEMPLAR_FILTER_HISTOGRAMS` | Sets the default `ExemplarFilter` to use for histogram metrics. If not set than `OTEL_METRICS_EXEMPLAR_FILTER` also applies to histograms. | Experimental key (may be removed or changed in the future). Added in `1.9.0` | | |
| `OTEL_DOTNET_EXPERIMENTAL_METRICS_EXEMPLAR_FILTER_HISTOGRAMS` | Sets the default `ExemplarFilter` to use for histogram metrics. If not set, then `OTEL_METRICS_EXEMPLAR_FILTER` also applies to histograms. | Experimental key (may be removed or changed in the future). Added in `1.9.0` | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed this a bit for @vishweshbankwar's comment above.
…deBlanch/opentelemetry-dotnet into sdk-exemplarfilter-histograms
ExemplarFilterType? exemplarFilter; | ||
if (!TryParseExemplarFilterFromConfigurationValue(configValue, out var exemplarFilter)) | ||
{ | ||
OpenTelemetrySdkEventSource.Log.MeterProviderSdkEvent($"Exemplar filter configuration was found but the value '{configValue}' is invalid and will be ignored."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we be showing string interpolation in our own logging.. though this is just startup only!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
left couple nits about using dedicated internal logs about which ExemplarFilter is finally enabled.
Relates to #2527
Changes
OTEL_DOTNET_EXPERIMENTAL_METRICS_EXEMPLAR_FILTER_HISTOGRAMS
which can be used to set the default SDKExemplarFilter
for histogram metrics.Merge requirement checklist
CHANGELOG.md
files updated for non-trivial changes