-
Notifications
You must be signed in to change notification settings - Fork 41.3k
Description
In Spring Slueth, there was customizers for the WebClient
and RestTemplate
which would propagate traces between services by passing the W3C or B3 headers to the next service in the chain.
These implementations appear to be missing in Spring Boot 3 with the new Micrometer tracing support. Some work has been done to support these propagation types in this PR but so far they do not seem to have extended to the rest clients built into Spring Boot.
This is a problem as any services you call from Spring which also support tracing (including other spring services) will lose vital information about the whole chain of requests. The next application will end up creating a new trace ID which will disconnect the trace from the original request.
For now I think users should be able to get the trace ID from the ThreadLocal variables or the reactor context and build their own interceptor, but I'm not sure how to grab this trace in servlet vs webflux. If any maintainer is able to provide an example of grabbing the trace ID in both web runtimes that would be helpful until this is implemented.