Skip to content

Sleuth not working with Spring Boot 3.0.0 #2239

@schoeffm

Description

@schoeffm

Describe the bug
I have a Spring Boot 3.0.0 based application where I tried to integrate Spring Sleuth with Spring Kafka - unfortunately without much success. In simulating that issue I've came up with a minimal example that's basically based on the Spring Sleuth Getting Started section. The resulting application doesn't generate traces/spans and doesn't log 'em as described in the docs.

Bildschirmfoto 2022-12-11 um 11 30 39

I'm also not able to inject instances of Tracer into my Beans (as described here) since there is apparently no bean of that type configured:

2022-12-11T13:03:59.041+01:00 ERROR [sleuth-test,,] 2551 --- [           main] o.s.b.d.LoggingFailureAnalysisReporter   : 

***************************
APPLICATION FAILED TO START
***************************

Description:

Field tracer in de.bender.sleuth.sleuthdemo.SleuthController required a bean of type 'org.springframework.cloud.sleuth.Tracer' that could not be found.

The injection point has the following annotations:
	- @org.springframework.beans.factory.annotation.Autowired(required=true)


Action:

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

Notice: When changing the version of spring-boot-starter-parent from 3.0.0 to i.e. 2.6.6 the same example produces:
Bildschirmfoto 2022-12-11 um 11 28 50

Sample
I've added the sample-project that produces the output from above. Just change the version of spring-boot-starter-parent from 3.0.0 to 2.6.6 to simulate my output.

sleuth-demo.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions