mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-09-17 12:09:16 +00:00
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>