Trace context propagation to CompletableFuture and @Async methods #7657
-
Hello, Is there a way to propagate trace context to |
Beta Was this translation helpful? Give feedback.
Answered by
mateuszrzeszutek
Feb 1, 2023
Replies: 1 comment
-
Hey @birkoni5 , If you wrap the @Bean
public Executor taskExecutor() {
Executor executor = // ...
return Context.taskWrapping(executor);
} |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
birkoni5
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey @birkoni5 ,
If you wrap the
Executor
you're using for async execution withContext#taskWrapping()
the context will automatically propagate to all tasks that are executed by it.