I have an api which is called through rest and then sends message to camel queue, on which new trace id is created instead of using the initial one, tried manually setting "X-B3-TraceId" header, but looks like it getting overridden still. Am I missing something for it to be passed over? my ZipkinTracer config looks like this:
@Bean
@ConditionalOnMissingBean(ZipkinTracer.class)
ZipkinTracer zipkin(final CamelContext camelContext) {
ZipkinTracer zipkin = new ZipkinTracer();
zipkin.setPort(9411);
zipkin.setHostName("127.0.0.1");
zipkin.setRate(1f);
zipkin.setEndpoint("http://localhost:9411/api/v2/spans");
OkHttpSender sender = OkHttpSender.create("http://localhost:9411/api/v2/spans");
zipkin.setSpanReporter(AsyncReporter.create(sender));
camelContext.setTracing(true);
zipkin.init(camelContext);
return zipkin;
}
And I send a message by constructing an exchange object and passing it to producerTemplate.
producerTemplate.send(startEndpoint, exchange)