Better support of OpenTracing in Reactives Routes
See original GitHub issueDescribe the bug
OpenTracing extension doesn’t work properly with Reactives Routes.
It needs @Traced
annotation to be set on the reactive routes to start a new span but parent span is not propagated from the request headers.
Expected behavior OpenTracing extension should work with Reactive Routes the same way it works with Jax-RS. Meaning, without any annotation, a span is created as a childof a potential parent span found in the request headers.
Actual behavior
Requires to set @Traced
to start a span, but it cannot be linked to the incoming parent span.
To Reproduce
You can use the sample project of this issue https://github.com/quarkusio/quarkus/issues/15182 and hit the reactive routes /route1
with a valid Uber-Trace-Id header.
The log will print a different traceId from the one given in the request header.
Environment (please complete the following information): Java version: 11 Quarkus version: 1.11.3-Final quarkus-smallrye-opentracing quarkus-vertx-web
Additional context The extension use SmallRye OpenTracing which in turns use https://github.com/opentracing-contrib/java-jaxrs. There is a vertx.web implentation that may be used. https://github.com/opentracing-contrib/java-vertx-web.
This may be related to https://github.com/quarkusio/quarkus/issues/15182. The vertx.web implementation of opentracing relies on RountingContext to propagate the active span. Thus, removing the need of Thread local storage. This may impact the way the @Traced annotation would work in this context.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:9 (8 by maintainers)
Should we close this given that both OpenTracing and Reactive Routes have been superceded in Quarkus with alternatives we now put most of our energy into?
Yes.