Search code examples
spring-cloud-sleuth

spring sleuth baggage - support in sleuth version #2


Is spring sleuth baggage going to be deprectaed? If yes what is the alternative?

Is it must to have a configuration for the propogated field names starting version #2?


Solution

  • Where did you get this information that baggage is deprecated? In the documentation we've stated that you need to explicitly state what the baggage keys should be, not that the baggage is depreacted. Also in the Sleuth migration guide (https://github.com/spring-cloud/spring-cloud-sleuth/wiki/Spring-Cloud-Sleuth-2.0-Migration-Guide#baggage-needs-to-be-whitelisted) you could see

    In Sleuth we used to create headers that had the baggage prefix. You can do it via 2 properties:

    spring.sleuth.baggage-keys - those keys will be prefixed with baggage- and baggage_. That way we are backward compatible with
    

    previous versions of Sleuth. spring.sleuth.propagation-keys - those keys will be whitelisted as they are. No prefix will be set.