feat(baggage): add support for w3c baggage#200
Open
rachelyangdog wants to merge 4 commits intomainfrom
Open
Conversation
bantonsson
reviewed
Apr 1, 2026
| // ── Unit: composite propagator inclusion/exclusion ──────────────────────── | ||
|
|
||
| #[test] | ||
| fn baggage_included_in_fields_when_configured() { |
Collaborator
There was a problem hiding this comment.
What happens when we only have baggage as an injector or extractor?
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.
What does this PR do?
Adds W3C Baggage propagation support (baggage header) to the composite propagator. When baggage is included in the propagation style configuration, the global TextMapPropagator will read and write the baggage HTTP header using opentelemetry_sdk::propagation::BaggagePropagator.
Changes:
Adds TracePropagationStyle::Baggage variant, recognized case-insensitively from
DD_TRACE_PROPAGATION_STYLE,DD_TRACE_PROPAGATION_STYLE_EXTRACT, andDD_TRACE_PROPAGATION_STYLE_INJECTAdds baggage to the default propagation styles alongside datadog and tracecontext
Wires inject/extract separately at the DatadogPropagator layer, respecting the extract-vs-inject style override independently
Adds propagation::baggage module exposing the header key so fields() includes "baggage" when the style is configured
system-tests PR
Motivation
What inspired you to submit this pull request?
Additional Notes
DD_TRACE_PROPAGATION_STYLE_EXTRACTandDD_TRACE_PROPAGATION_STYLE_INJECTcan be used to enable baggage on only one direction independently of the other