I have several Spring Boot applications, one of which is using Spring Boot 3 and the others are using Spring Boot 2. I need to implement request tracing between them and between them and Kafka. However, I haven't found anything on how to integrate tracing via Spring Cloud Sleuth on one application and Micrometer-tracing on another application. Is there any way to retrieve the trace ID generated by Sleuth in an application that uses Micrometer Tracing and backwards?
I tried to connect sleuth and micrometer-tracing in apps and send http requests to spring boot 2 app which sent a message to kafka which read the spring boot 3 app but traceId only showed up in spring boot 2 app
Hey we describe in the wiki page on how to migrate from Boot 2.7 to Boot 3.0 (https://github.com/micrometer-metrics/tracing/wiki/Spring-Cloud-Sleuth-3.1-Migration-Guide). You should provide 2 propagation types on the Boot 2.7 side (W3C, B3) and automatically Boot 3.0 will pick up the W3C one.
Since Boot 3.0 disallows joined spans and sets trace id to be of 128 bit, set the same configuration on the Sleuth side.
spring.sleuth.traceId128=true
spring.sleuth.supportsJoin=false
UPDATE:
With Spring Boot 3.1 you do have an option to turn on joined spans. Check the docs here. For reference I'm pasting the properties below
management.tracing.brave.span-joining-supported=true