Search code examples
springmicrometerzipkinjaegerobservability

Combine Micrometer's @Observed and B3 Trace ID value


The goal is to combine traces of network calls and spans observed by Micrometer. Network calls are observed with B3-headers. Method calls are observed with @Observed annotation. I have a B3-Trace-ID value that I want to combine with observed methods calls.

Not sure where I can inject B3 values into methods


Solution

  • You should find how to set up B3 propagation for Micrometer Tracing in the official docs: https://micrometer.io/docs/tracing

    If you use Spring Boot, you can set management.tracing.propagation.type=b3.