Skip to content

Getting different trace Id when calling @Async calls in Java, using open telemetry manual instrumentation #12112

Closed Answered by laurit
keerthanacv asked this question in Q&A
Discussion options

You must be logged in to vote

When using manual instrumentation there is no automatic context propagation between threads, you'll have to take care of it on your own. One way to achieve this would be to wrap the executor using https://github.com/open-telemetry/opentelemetry-java/blob/7522bfe141524d52649b5c344c643104b57af608/context/src/main/java/io/opentelemetry/context/Context.java#L119

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by keerthanacv
Comment options

You must be logged in to vote
0 replies
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