Replies: 1 comment 3 replies
-
This is just a suggestion, as your use-case may not work for it, but approach is to make sure you run your CompletableFutures with an Executor, and use our wrapper That will get you context propagation..then you can simply start a span and Caveat: I haven't tried this myself, but it seems like it should work. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi everybody,
I am having trouble finding a way to do tracing with a chain of completableFutures.
For example, I have a completableFuture
future = CompletableFuture.completedFuture(instance).thenCompose(instance -> process(instance)).whenComplete((result, throwable) -> {error handling)
What's the best way to start a span in the first
thenCompose
beforeprocess()
and end it in thewhenComplete
?Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions