Using opnetelemetry-java in context of a reactive Spring-Boot application #4471
Unanswered
frommeyerc
asked this question in
Q&A
Replies: 2 comments 6 replies
-
hey @frommeyerc! check out https://github.com/open-telemetry/opentelemetry-java-instrumentation/tree/main/instrumentation/reactor-3.1/library, this is standalone reactor support (which is also auto-injected by the javaagent) |
Beta Was this translation helpful? Give feedback.
6 replies
-
Added an issue. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I'm currently evaluating the opentelemetry tracing instrumentation for use in a company setup. The current target are new Spring-Boot services. Most of them are currently being implemented using the new reactive web framework provided by Spring build on top of the Reactor library.
Using the spring-boot autoconfiguration library from a first glance works like a charm. However after looking closer I discovered that the tracing context is not properly handled. The default implementation uses a ThreadLocal which of course doesn't work in a reactor project where the thread of execution can easily switch between java threads. I tried to build a custom implementation using the Reactor context. However that turns out to be tricky. First of all without blocking I'd only get a
Mono<Context>
from a call toMono.defereContextual()
. This could be solved with blocking. But for attaching the Context I'd need to get hold of the Reactive Pipeline which seams to be quite hard with the given interfaces. Also this would break with the way e.g. the WebClient instrumentation currently is build.I'm curious on what the opinion here is. Is this set of libraries going to support reactive Spring-Boot applications in the future? Is there maybe even already a solution on how to do that now? Or will these libraries only support the traditional programming model?
Cheers
Christian
Beta Was this translation helpful? Give feedback.
All reactions