We are currently using sleuth 2.2.3.RELEASE, and we couldn't see the field userId passed in http headers are not propagating. Below is our code.
BaggageField REQUEST_ID = BaggageField.create("x-vcap-request-id");
BaggageField USER_ID = BaggageField.create("userId");
Tracing.newBuilder().propagationFactory(
BaggagePropagation.newFactoryBuilder(B3Propagation.FACTORY)
.add(SingleBaggageField.remote(REQUEST_ID))
.add(SingleBaggageField.newBuilder(USER_ID).addKeyName("baggage-user-id").build())
.build());
We doubt that some issue in YML file. We tried with all the below options but none is working.
#1 baggage-keys: baggage-user-id
#2 propagation-keys: baggage-user-id
#3 baggage-keys: user-id
In logback:
%X{baggage-user-id:-}
We are passing userId as in http header.