Search code examples
spring-cloud-sleuthspring-boot-2openfeign

How I can use Sleuth Span in spring boot 2


Trying to upgrade from spring boot 1 to 2, The problem I'm facing is with tracing

In spring boot 1, we are using sleuth Trace that seems like deprecated in the spring boot 2 and suggesting to use 'brave'.

One of the problems is our another microservices are using spring boot 1, how I can carry the Span in spring boot 2? It is deprecated.

I tried to use the sleuth old version, but getting conflicts and spring application is failing to start


Solution

  • If one of your applications is using sleuth 1.x and the other 2.x they will be able to pass and continue the tracing context. In the wiki page here we describe how to migrate from one version to another https://github.com/spring-cloud/spring-cloud-sleuth/wiki/Spring-Cloud-Sleuth-2.0-Migration-Guide