Repository navigation
W3CBaggagePropagator: support multiple baggage headers in extract - #5814
Open
knowprasad wants to merge 2 commits into
Open
knowprasad wants to merge 2 commits into
knowprasad wants to merge 2 commits into
Conversation
…agator Fixes open-telemetry#5811 by extracting all baggage header values returned by getter instead of only the first element, combining multiple header fields with commas in compliance with W3C Baggage and RFC 9110 specifications. Signed-off-by: prsdx <prsdx.dev@gmail.com>
Pull request dashboard statusWaiting on reviewers · refreshed 2026-10-23 04:00 UTC Review the latest changes. Status above doesn't look right?
|
Signed-off-by: prsdx <prsdx.dev@gmail.com>
This branch has not been deployed
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.
Description
In \opentelemetry.baggage.propagation.W3CBaggagePropagator.extract, the implementation extracted only the first element from \getter.get(carrier, self._BAGGAGE_HEADER_NAME). When a carrier contains multiple \�aggage\ header entries (for example, when using frameworks that return a list of headers or when multiple integrations such as Sentry and OpenTelemetry inject separate baggage headers), all entries after the first were discarded.
Per the W3C Baggage specification:
And RFC 9110 Section 5.3:
This PR updates \W3CBaggagePropagator.extract\ to:
Fixes #5811
Type of change
Checklist: