Skip to content

spring-boot-micrometer-tracing-brave module not pulling in Brave library causing auto-configuration not to work #49276

Description

@cabbonizio

As part of upgrading to Spring Boot 4, we noticed the trace and span ID's not being logged as part of the micrometer brave implementation, so we found there's some new Spring Boot dependencies to handle this:

<dependency>
	<groupId>org.springframework.boot</groupId>
	<artifactId>spring-boot-micrometer-tracing-brave</artifactId>
</dependency>

When we adopted this we noticed the trace and span tags still were not appearing so we looked into the following auto-configuration class:

org.springframework.boot.micrometer.tracing.brave.autoconfigure.BraveAutoConfiguration

This class is conditional on having io.micrometer.tracing.brave.bridge.BraveTracer on classpath. We noticed this class was not on the classpath with the expectation the spring-boot-micrometer-tracing-brave dependency would automatically include given it's very specific to "brave".

In the modules build.gradle we noticed it was an optional dependency:

optional("io.micrometer:micrometer-tracing-bridge-brave")

The question is, was this intentional? If so, why? Since this is a specific module for brave I would expect to make sure it's included on the classpath the same way for example the spring-couchbase-starter includes the Couchbase java SDK. Many thanks for taking this into consideration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: invalidAn issue that we don't feel is valid

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions