Skip to content

Span.fromContext(Context.current()).getSpanContext() return PropagatedSpan.INVALID #7728

Answered by cleverchuk
cleverchuk asked this question in Q&A
Discussion options

You must be logged in to vote

I was able to solve the problem. By using similar configuration as is found here and ensuring that any dependency on OTEL is compileOnly. This ensures that bootstrap class loader and the agent class loader don't end up loading the same exact class. I also refactored the project so it uses same structure as the one linked.

I believe the root cause was the project was using the buildSrc approach to repackage the jar.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by cleverchuk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants