As per the README here , I am using the following configuration to pass x-vcap-request-id
and x-vcap-group-id
from one application to the other.
@Bean
public Factory propagationFactory() {
return brave.propagation.ExtraFieldPropagation.newFactory(brave.propagation.B3Propagation.FACTORY,
"x-vcap-request-id", "x-vcap-group-id");
}
@Bean
public TracingFactoryBean tracing() {
TracingFactoryBean tracingFactoryBean = new TracingFactoryBean();
tracingFactoryBean.setPropagationFactory(propagationFactory());
return tracingFactoryBean;
}
However, this configuration is messing up default sleuth behavior. With this code, Sleuth no longer adds TraceId
and SpanId
to the log
What's the best/recommended way to pass along custom headers between microservices ?