I need to set the traceId with an existing Id (we have created some kind of correlation-id from the main origin app) into brave tracer.
I don't want to use the Spring Sleuth/brave created one as I want to make it consistent throughout my different micro-services. I am able to create traces and span and able to send all details into Zipkin. My sample snippet:
import brave.Span;
import brave.Span.Kind;
import brave.Tracer;
import brave.propagation.TraceContext;
span = this.tracer.nextSpan().name("myservice");
span.kind(Kind.SERVER);
span.tag("path", servletPath).start();
I am using: Spring Cloud 'Greenwich.BUILD-SNAPSHOT' and brave. The whole purpose is to search using correlationId rather than traceId in zipkin ui.