-
Notifications
You must be signed in to change notification settings - Fork 49
Spring Cloud Sleuth 3.1 Migration Guide
We've moved the API code from Sleuth to Micrometer Tracing. The Brave and OpenTelemetry bridges have their respective modules in Micrometer Tracing.
The Autoconfiguration of Brave and OpenTelemetry Tracer got moved to Spring Boot. So did autoconfiguration for Zipkin and Wavefront reporters for both tracers.
The default Tracer now is OpenTelemetry tracer, the default Trace Id format is 128 bit and default Context Propagation format is W3C. By default we don't support joined spans.
The instrumentation code and its autoconfiguration got moved to respective projects (e.g. Web instrumentation is now in Spring Web and Spring Boot autconfigures that).
The whole Spring Cloud Sleuth API module got pretty much moved to Micrometer Tracing. That means that in the vast majority of places you should just change the package from org.springframework.cloud.sleuth
to io.micrometer.tracing
.
Parts of the Spring Cloud Sleuth Autoconfigure and Spring Cloud Sleuth OTel Autoconfigure modules got moved to:
- Boot 3 Brave Autoconfiguration
- Boot 3 OpenTelemetry Autoconfiguration
- Boot 3 Zipkin Autoconfiguration
- Boot 3 Wavefront Autoconfiguration
You have to check each project for their Micrometer Observation configuration.
Spring Cloud Sleuth came with a bunch of executor / executor service instrumentations that would propagate the tracing context together with a creation of a span. With the new releases of Micrometer we come to the conclusion that we have to separate those two approaches.
This is why we have the Context Propagation library that will propagate objects (thread locals) through various means of communication (you can read more about it in the Context Propagation Docs.
To wrap executors just use the ContextExecutorService.wrap()
or ContextScheduledExecutorService.wrap()
methods. You can also use ContextSnapshot.wrap()
methods to wrap Runnables or Callables.
Spring Cloud Sleuth Samples got migrated to Micrometer Samples.