fix(otlp): don't configure an automatic OTel propagator#5319
Open
jamescrosswell wants to merge 2 commits into
Open
fix(otlp): don't configure an automatic OTel propagator#5319jamescrosswell wants to merge 2 commits into
jamescrosswell wants to merge 2 commits into
Conversation
The OTLP integration spec states the integration MUST NOT set up an automatic propagator; cross-service trace propagation is handled by the propagateTraceparent setting or by user-configured OTel propagators. AddSentryOtlpExporter / UseOtlp previously called Sdk.SetDefaultTextMapPropagator(new SentryPropagator()), which is inconsistent with the spec and with our other OTLP integrations. This removes that call and the now-purposeless defaultTextMapPropagator parameter from both public methods. BREAKING CHANGE: removed the defaultTextMapPropagator parameter from AddSentryOtlpExporter and UseOtlp. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5319 +/- ##
==========================================
- Coverage 74.16% 74.16% -0.01%
==========================================
Files 508 508
Lines 18353 18351 -2
Branches 3586 3585 -1
==========================================
- Hits 13612 13610 -2
Misses 3869 3869
Partials 872 872 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
jamescrosswell
commented
Jun 26, 2026
jamescrosswell
commented
Jun 26, 2026
Co-authored-by: James Crosswell <jamescrosswell@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #5299
Summary
The OTLP integration spec states:
Our OTLP exporter was inconsistent with this:
AddSentryOtlpExporter(andUseOtlp) calledSdk.SetDefaultTextMapPropagator(new SentryPropagator()), automatically configuring a global propagator. This brings us in line with the spec and with our other OTLP integrations.Changes
Sdk.SetDefaultTextMapPropagator(...)call fromAddSentryOtlpExporter.defaultTextMapPropagatorparameter from bothAddSentryOtlpExporterandSentryOptionsExtensions.UseOtlp.PropagateTraceparent/ their own OTel propagator config.AddSentryOtlpExporterleavesPropagators.DefaultTextMapPropagatoruntouched.Users who want cross-service propagation should now either set
SentryOptions.PropagateTraceparentor configure OpenTelemetry propagators themselves (e.g.Sdk.SetDefaultTextMapPropagator(...)).Follow-up
🤖 Generated with Claude Code