Files
spring-boot/documentation/spring-boot-docs
Oleksandr Shevchenko ce75f008b0 Add baggage tag fields to spans with OpenTelemetry
With OpenTelemetry, fields listed in management.tracing.baggage.tag-fields
only became span tags when the application itself touched the baggage
through the Tracer API. Baggage that arrived with a request was
propagated correctly, but spans were not tagged with it (see
micrometer-metrics/tracing#933).

This commit registers Micrometer Tracing's BaggageTaggingSpanProcessor
whenever baggage is enabled and at least one tag field is configured, so
that spans are tagged with the baggage that is present in their parent
context. A custom BaggageTaggingSpanProcessor bean backs off the
auto-configured one. The tag-fields property is now also mentioned in
the baggage section of the tracing documentation.

See gh-51656

Signed-off-by: Oleksandr Shevchenko <oleksandr.shevchenko@datarobot.com>
2026-09-11 11:18:02 +01:00
..