I'm migrating Thorntail (2.4.0.Final) to Quarkus (1.11.1.Final).
During test phase we have noticed that distributed tracing is not working.
Tracing works (single component traces) but uber-trace-id is not passed with rest request header, so next microservice (recipient of rest request) is generating Trace from zero without span info.
In Thorntail it was done just by configuration on ClientBuilder
import org.eclipse.microprofile.opentracing.ClientTracingRegistrar;
import javax.ws.rs.client.ClientBuilder;
...
ClientBuilder clientBuilder = ClientBuilder.newBuilder();
...
ClientTracingRegistrar.configure(clientBuilder);
Comparing both I have noticed that with Thorntail there was ClientTracingRegistrarProvider available
public class ResteasyClientTracingRegistrarProvider implements ClientTracingRegistrarProvider {
public ResteasyClientTracingRegistrarProvider() {
}
public ClientBuilder configure(ClientBuilder clientBuilder) {
return this.configure(clientBuilder, Executors.newFixedThreadPool(10));
}
public ClientBuilder configure(ClientBuilder clientBuilder, ExecutorService executorService) {
ResteasyClientBuilder resteasyClientBuilder = (ResteasyClientBuilder)clientBuilder;
Tracer tracer = (Tracer)CDI.current().select(Tracer.class, new Annotation[0]).get();
return (ClientBuilder)resteasyClientBuilder.executorService(new TracedExecutorService(executorService, tracer)).register((new Builder(tracer)).withTraceSerialization(false).build());
}
}
with all wildfly related configuration like file
META-INF/services/org.eclipse.microprofile.opentracing.ClientTracingRegistrarProvider
with provider path
org.wildfly.swarm.mpopentracing.deployment.ResteasyClientTracingRegistrarProvider
In Quarkus we are building rest client in the same way and there is no such provider.
Is anybody aware what we need to change to have this distributed tracing feature?
Additional info:
we are building rest client with jaxrs API (javax.ws.rs)
and building app with dependencies:
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-resteasy</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-smallrye-opentracing</artifactId>
</dependency>
Thanks in advance for all suggestions and help.
question from:
https://stackoverflow.com/questions/66059262/quarkus-with-microprofile-opentracing-distributed-tracing-doesnt-work 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…