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.
Comment From: mhalbritter
I don't quite understand. Propagating trace context between services is working. It works if you use the auto-configured RestTemplateBuilder or the WebClient.Builder to construct your RestTemplate or WebClient. If that's not the case for you, please take the time to provide a complete minimal sample (something that we can unzip or git clone, build, and deploy) that reproduces the problem.
Comment From: braunsonm
@mhalbritter Can you link the intrumentation where this is supposed to happen? I have no problem reproducing this problem on 3.0.0 using this sample pointing at another spring app: https://github.com/braunsonm/spring-inconsistency-sample/blob/main/servlet/src/main/java/com/example/demo/TestController.java#L9-L19
The destination does not see the B3 headers if you set management.tracing.propagation.type to B3
Comment From: braunsonm
My mistake. I was looking for x-b3-tracid to be sent, only b3 is sent. This does work correctly sorry for the confusion.