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.
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:
When we adopted this we noticed the trace and span tags still were not appearing so we looked into the following auto-configuration class:
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:
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.