I am migrating from Spring Boot 2 to Spring boot 3, and switched from spring cloud sleuth to io.micrometer:micrometer-tracing-bridge-brave
in the migration process. I noticed that Spring Boot 2 services use b3
headers to propagate span & trace IDs, while the new Spring Boot 3 projects use a w3c traceparent
header.
To still be able to trace messages through multiple Spring Boot 2 and Spring Boot 3 services in our own domain, I configured every Spring Boot 3 service in our domain to keep using the "old" B3 format using this stackoverflow post:
@Bean
public Tracing braveTracing() {
return Tracing.newBuilder()
.propagationFactory(B3Propagation.newFactoryBuilder().injectFormat(B3Propagation.Format.SINGLE).build())
.build();
}
Which works, however I'd rather have the Spring Boot 3 applications recognize both formats and (if possible) propagate both formats as well. The reason is that applications outside our domain expect the W3C header instead of the B3 header. Would anyone know if this is possible?