-
Notifications
You must be signed in to change notification settings - Fork 858
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
W3CBaggagePropagator wipe baggage from other propagators #5883
Comments
@jkwatson @jack-berg could you verify that current behavior is intended or transfer this to opentelemetry-java if this is a valid concern |
This is intended behavior as far as I know. The W3C Baggage Propagator is not intended to combine baggage with any other baggage propagator (much as the W3C Trace Context propagator doesn't somehow combine trace contexts from other propagators). I'll transfer the issue, but I'm pretty sure there would need to be a spec change to support this. |
@ddark008 can't you get the behavior you intend by ensuring that your custom |
@jack-berg Thank you for your answer! |
@ddark008 yup you can see the source code that interprets So setting |
@ddark008 please close if this has been satisfied. Thanks! 🙏🏻 |
@jack-berg thank you for the detailed response. It would be great if this behavior is documented to ensure it doesn't change during future refactoring. |
Describe the bug
I am currently working on developing custom propagators that parse baggage from specific headers.
However, when trying to use these custom propagators alongside the W3CBaggagePropagator, I encounter an unexpected behavior.
It seems that the W3CBaggagePropagator creates a new BaggageBuilder and discards the current context Baggage, preventing my custom propagators from functioning properly.
Best solution use exist baggage:
Steps to reproduce
Add to config
otel.propagators = tracecontext,baggage,xreqid
Expected behavior
Context contain baggage from all propagators
Actual behavior
Context contain baggage only from W3CBaggagePropagator
Javaagent or library instrumentation version
1.29.0
Environment
JDK: 17
OS: Ubuntu
Additional context
No response
The text was updated successfully, but these errors were encountered: