Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Spring Cloud Sleuth with Spring Boot 3.0 and Tracer

I use spring sleuth in my project and after I updated spring-boot to version 3 I receive the following error:

Consider defining a bean of type 'org.springframework.cloud.sleuth.Tracer' in your configuration.

I inject Tracer in my logging service to get current traceId and spanId. This is the dependency for spring sleuth:

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

implementation 'org.springframework.cloud:spring-cloud-starter-sleuth:3.1.5'

Is Tracer Bean no longer built in in terms of spring boot v3?

>Solution :

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).

see: https://spring.io/projects/spring-cloud-sleuth

This means that for Boot 3.x you need to use Micrometer Tracing instead of Sleuth.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading