Search code examples
javaspring-bootspring-cloud-sleuth

SpringBoot 3.0.0-M1 + SpringCloud 2022.0.0-M1 [ERROR] 'dependency.version' for org.springframework.cloud:spring-cloud-starter-sleuth:jar is missing


With the exciting releases of both SpringBoot 3.0.0-M1 and SpringCloud 2022.0.0-M1, I went ahead to bump the versions up.

https://spring.io/blog/2022/01/20/spring-boot-3-0-0-m1-is-now-available

https://spring.io/blog/2022/01/27/spring-cloud-2022-0-0-m1-codename-kilburn-has-been-released

While things worked perfectly fine on my SpringBoot 2.6.3 + Jubilee, the exact same code, with just the version change on the pom file to the new pair SpringBoot 3.0.0-M1 + SpringCloud 2022.0.0-M1, the following error is observed.

/Library/Java/JavaVirtualMachines/jdk-17.0.2.jdk/Contents/Home/bin/java -Dmaven.multiModuleProjectDirectory=abc -Dmaven.home=maven3 [...] -Didea.version=2021.3.1 clean install
[INFO] Scanning for projects...
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] 'dependencies.dependency.version' for org.springframework.cloud:spring-cloud-starter-sleuth:jar is missing. @ line xx, column 21
[ERROR] 'dependencies.dependency.version' for org.springframework.cloud:spring-cloud-sleuth-zipkin:jar is missing. @ line xx, column 21
 @ 

Per Spring Cloud official documentation:

Spring Cloud Sleuth

Spring Cloud Sleuth’s last minor version is 3.1. You can check the 3.1.x branch for the latest commits.

The core of this project got moved to Micrometer Tracing project and the instrumentations will be moved to Micrometer and all respective projects (no longer all instrumentations will be done in a single repository.

I am having a hard time understanding. Does it mean from 3.0/2022.0 onward, there is no Sleuth anymore? We need to use Micrometer instead?

How to keep existing features offered by Sleuth please?

Thank you


Solution

  • I am having a hard time understanding. Does it mean from 3.0/2022.0 onward, there is no Sleuth anymore? We need to use Micrometer instead?

    Yes

    How to keep existing features offered by Sleuth please?

    We will be providing support for those via Micrometer & Micrometer Tracing.

    does it means we can just remove the Sleuth dependency from the pom file, and instead add/replace with the micrometer one, and things will be the same, still be working?

    If you don't have any custom Sleuth configuration then there should be nothing that you should do for observability to work. If you had custom Sleuth configuration you will need to port it to Micrometer Tracing which essentially is a copy of Sleuth so that should be mostly a package change. If you were doing Brave customizations then most likely you'll have nothing to change.

    UPDATE:

    Here you can find a link to the Sleuth to Micrometer Tracing migration guide https://github.com/micrometer-metrics/tracing/wiki/Spring-Cloud-Sleuth-3.1-Migration-Guide