Skip to content

fix(propagator-b3): align B3 propagator with the OpenTelemetry spec - #3828

Merged
cijothomas merged 10 commits into
open-telemetry:mainfrom
herin049:fix/b3-propagator-spec-compliance
Dec 4, 2026
Merged

cijothomas merged 10 commits into
open-telemetry:mainfrom
herin049:fix/b3-propagator-spec-compliance

Conversation

@herin049

@herin049 herin049 commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #3829

Changes

Aligns opentelemetry-propagator-b3 with the B3 spec and the OpenTelemetry B3 requirements.

Breaking

  • Propagator::new()/default() and B3Encoding::UnSpecified now inject the single b3 header (spec: MUST default to single-header)

Fixes

  • SingleHeader no longer also injects x-b3-* headers.
  • Debug (d / X-B3-Flags: 1) implies sampled.
  • An invalid X-B3-ParentSpanId in the single header now rejects the context.
  • Single header parsing no longer allocates.
  • The private debug marker moved from 0x04 to 0x40 so it can't collide with future W3C flags (minor)

Merge requirement checklist

  • CONTRIBUTING guidelines followed
  • Unit tests added/updated (if applicable)
  • Appropriate CHANGELOG.md files updated for non-trivial, user-facing changes
  • Changes in public API reviewed (if applicable)

@opentelemetry-pr-dashboard

opentelemetry-pr-dashboard Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Pull request dashboard status

Merged · refreshed 2026-12-04 02:38 UTC

Status above doesn't look right?
  • Anything look wrong? Report it with what you expected; it helps us improve the dashboard.

@codecov

codecov Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.8%. Comparing base (802dc77) to head (d35d14d).

Additional details and impacted files
@@          Coverage Diff          @@
##            main   #3828   +/-   ##
=====================================
  Coverage   86.7%   86.8%           
=====================================
  Files        131     131           
  Lines      34756   34801   +45     
=====================================
+ Hits       30160   30215   +55     
+ Misses      4596    4586   -10     

☔ View full report in Codecov by Harness.
📢 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.

@herin049
herin049 marked this pull request as ready for review October 29, 2026 14:23
@herin049
herin049 requested a review from a team as a code owner October 29, 2026 14:23
@cijothomas
cijothomas enabled auto-merge December 4, 2026 02:24
@cijothomas
cijothomas added this pull request to the merge queue Dec 4, 2026
Merged via the queue into open-telemetry:main with commit 7385eda Dec 4, 2026
33 checks passed
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.

[Bug]: B3 propagator deviates from the OpenTelemetry B3 requirements

3 participants