Skip to content

Span processor cannot extract otel-context key #5723

Discussion options

You must be logged in to vote

Hey @thangcircle ,
Are you using different ContextKey instances in your app and in the SpanProcessor? Context keys are compared by reference (take a look at its javadoc for a small example), so if you're using different instances they are not the same context keys, even though they're named the same.
To solve that, you can either make the ContextKey constant available both to the agent and the app (by putting it in the bootstrap classloader), or use Baggage instead to propagate your custom entries.

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@thangcircle
Comment options

@anuraaga
Comment options

@thangcircle
Comment options

@trask
Comment options

Answer selected by thangcircle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants