After migrating spring boot from version 2.x to 3 we miss traceId and spanId in our logs.
We removed all sleuth dependencies and added
implementation 'io.micrometer:micrometer-core'
implementation 'io.micrometer:micrometer-tracing'
implementation 'io.micrometer:micrometer-tracing-bridge-brave'
implementation platform('io.micrometer:micrometer-tracing-bom:latest.release')
as well as
logging.pattern.level: "%5p [${spring.application.name:},%X{traceId:-},%X{spanId:-}]"
but no traceIds and spanIds are being logged.
Is there something we missed?
micrometer-tracing
dependency as it "is added transitively". Not sure if you need themicrometer-core
, logs work in my case just with the tracing bridge and actuator as mentioned in the comment below. – Napoli