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

2

6

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

Dewan answered 3/2, 2022 at 3:9 Comment(1)
Does it mean from 3.0/2022.0 onward, there is no Sleuth anymore? We need to use Micrometer instead?. Correct and if you read you see that all instrumentation from sleuth will be moved to the micrometer tracing project. Also you might want to reconsider the upgrade, as these are "just" milestone versions and aren't yet production ready.Resh
W
4

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

Wenoa answered 10/2, 2022 at 11:50 Comment(4)
that's not true, please provide a migration example, I'm migrating right now and can't find many, TraceableExecutorService etc.Lordship
If you're explicitly using TracableExecutorService that means that you're using custom logic. How are you using it at the moment?Wenoa
Hello Marcin, just wanted to say this post has now 1K+ view. I think people are getting a bit confused. Maybe can Spring team help dissipate any doubt by preparing some kind of migration guide for this? I can post the link as bold in my answerDewan
I've added a link to the migration guide github.com/micrometer-metrics/tracing/wiki/…Wenoa
B
0

Spring Boot 3.0.0-M3 docs still mention Sleuth: "Prometheus Exemplars are also supported. To enable this feature, a SpanContextSupplier bean should present. If you use Spring Cloud Sleuth, this will be auto-configured for you (...)" (https://docs.spring.io/spring-boot/docs/3.0.0-M3/reference/html/actuator.html#actuator.metrics.export.prometheus) but start.spring.io reports that Sleuth "requires Spring Boot >= 2.3.0.M1 and < 3.0.0-M1."

It seems, Spring Boot docs need fix here.

Regards, Piotr

Brutus answered 30/6, 2022 at 14:29 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.