Skip to content

feat!: use trace_based exemplar filter by default#2112

Open
bdewater-thatch wants to merge 1 commit intoopen-telemetry:mainfrom
bdewater-thatch:fix-metrics-exemplar-default
Open

feat!: use trace_based exemplar filter by default#2112
bdewater-thatch wants to merge 1 commit intoopen-telemetry:mainfrom
bdewater-thatch:fix-metrics-exemplar-default

Conversation

@bdewater-thatch
Copy link
Copy Markdown
Contributor

My coworkers complained about the OTEL_METRICS_EXEMPLAR_FILTER is not part of the provided exemplar filters. Exemplar is off warning that started popping up after we added the metrics SDK to our app. The ENV read also triggered before one can set OpenTelemetry.meter_provider.enable_exemplar_filter so that was a little bit annoying.

According to https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#exemplar trace_based is the default so that's what I implemented and it makes the aforementioned warning go away when the ENV var isn't explicitly set.

Copy link
Copy Markdown
Contributor

@xuan-cao-swi xuan-cao-swi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The intent was to ensure that metrics users do not experience any unanticipated overhead.
This is a breaking change so probably should use feat!

@bdewater-thatch bdewater-thatch changed the title fix: use trace_based exemplar filter by default feat!: use trace_based exemplar filter by default Apr 30, 2026
@bdewater-thatch bdewater-thatch force-pushed the fix-metrics-exemplar-default branch from 6a03bad to 7689208 Compare April 30, 2026 20:16
@bdewater-thatch
Copy link
Copy Markdown
Contributor Author

@xuan-cao-swi thanks for the feedback - fixed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants