Skip to content

feat: Propagate W3C + Sentry headers in Sentry.OpenTelemetry.Exporter#5217

Open
jamescrosswell wants to merge 1 commit into
mainfrom
fix/5210-w3c-propagator-default
Open

feat: Propagate W3C + Sentry headers in Sentry.OpenTelemetry.Exporter#5217
jamescrosswell wants to merge 1 commit into
mainfrom
fix/5210-w3c-propagator-default

Conversation

@jamescrosswell
Copy link
Copy Markdown
Collaborator

@jamescrosswell jamescrosswell commented May 11, 2026

Fixes #5210

Summary

  • The default TextMapPropagator used by AddSentryOtlpExporter (and UseOtlp) was previously SentryPropagator, meaning only sentry-trace and baggage headers were propagated out of the box.
  • This PR changes the default to a CompositeTextMapPropagator containing both TraceContextPropagator (W3C traceparent/tracestate) and SentryPropagator (sentry-trace + baggage).
  • Users who pass a custom defaultTextMapPropagator are unaffected — the new default only applies when no propagator is supplied.

🤖 Generated with Claude Code

… in Sentry.OpenTelemetry.Exporter

Fixes #5210

Resolves the adoption footgun where the OOTB default was Sentry-only
propagation. The default is now a CompositeTextMapPropagator that includes
both TraceContextPropagator (W3C traceparent/tracestate) and SentryPropagator
(sentry-trace + baggage), enabling out-of-the-box interoperability with
services that use standard W3C trace context headers.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@jamescrosswell jamescrosswell changed the title feat(opentelemetry): use W3C + Sentry composite propagator by default in Sentry.OpenTelemetry.Exporter feat: Propagate W3C + Sentry headers in Sentry.OpenTelemetry.Exporter May 11, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 11, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.17%. Comparing base (80f7ff5) to head (5ed716e).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5217      +/-   ##
==========================================
+ Coverage   74.13%   74.17%   +0.03%     
==========================================
  Files         506      506              
  Lines       18292    18296       +4     
  Branches     3576     3576              
==========================================
+ Hits        13561    13571      +10     
+ Misses       3859     3854       -5     
+ Partials      872      871       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jamescrosswell jamescrosswell marked this pull request as ready for review May 11, 2026 06:04
@jamescrosswell jamescrosswell requested a review from Flash0ver as a code owner May 11, 2026 06:04
@ericsampson
Copy link
Copy Markdown
Contributor

Thank you sir 🫡

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.

Sentry.OpenTelemetry.Exporter should accept and propagate both Sentry and W3C headers by default

2 participants