3

Following Spring Cloud Sleuth's documentation I've set up a Spring Boot application with a Zipkin client:

Gradle config:

"org.springframework.cloud:spring-cloud-starter-sleuth",
"org.springframework.cloud:spring-cloud-starter-zipkin"

With this I start a Zipkin Server instance:

docker run -d -p 9411:9411 openzipkin/zipkin

And I get traces in Zipkin. So far so good.

Then I switch to a Jaeger server:

docker run -d -e COLLECTOR_ZIPKIN_HTTP_PORT=9411 --name jaeger -p 5775:5775/udp -p 6831:6831/udp -p 6832:6832/udp -p 5778:5778 -p 16686:16686 -p 14268:14268 -p 9411:9411 jaegertracing/all-in-one:latest

And without any change to my application I can see those traces in Jaeger. Great.

Sleuth docs states:

15.1. OpenTracing

Spring Cloud Sleuth is compatible with OpenTracing. If you have OpenTracing on the classpath, we automatically register the OpenTracing Tracer bean. If you wish to disable this, set spring.sleuth.opentracing.enabled to false

Following this I added the Open Tracing dependency:

"io.opentracing.brave:brave-opentracing",

During startup the OpentracingAutoConfiguration creates a BraveTracer.

The point is I've placed a breakpoint in methods such as scopeManager(), activeSpan(), activateSpan(), buildSpan() from that BraveTracer and none of them is invoked during the execution of the application; the traces keep showing up in Jaeger though.

What am I missing here?

codependent
  • 23,193
  • 31
  • 166
  • 308

0 Answers0