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
Baggage is covered #11246
Comments
You can't really modify the context in a span processor because the typical flow is
even if you update the current context in a span processor it will get overwritten. You should do it in some other way. For example you could have a custom package propagator that adds the |
@crossoverJie the obvious issue with your code are that context is propagated only once. For example if you make two http requests to external service than only the first would be handled. Also the code assumes that everything runs on the same thread. |
According to the TextMapPropagator implementation that you showcased later on, it seems that you have not placed the If in your traces, the Furthermore, as @laurit pointed out, your storage of |
This has been automatically marked as stale because it has been marked as needing author feedback and has not had any activity for 7 days. It will be closed automatically if there is no response from the author within 7 additional days from this comment. |
Describe the bug
I have set the baggage in the previous span, but I can not get it in current span.
Steps to reproduce
Expected behavior
we can get the name of the previous span in the current span.
Actual behavior
The Baggage's data is empty.
Javaagent or library instrumentation version
1.32.0
Environment
JDK: openjdk version "21.0.2" 2024-01-16
OS: macOS
Additional context
After my debugging, I found that it was successfully set to
threadlocal
and then overwritten by other contexts.There is a repo can reduce this issue.
The text was updated successfully, but these errors were encountered: