The problem occurs when Spring Integration(spring boot) Application calls Spring boot application for sleuth logging of traceID and spanID from.
URL call --> Facade(written in spring integration,spring boot and supports sleuth)--> Spring boot microservice(Sleuth supported)
Microservice 1 : spring integration Http call
Microservice 2 : spring boot Rest controller
Here is the detail of the logs of both of the microservices.
Microservice 1 calls Microservice 2
Microserice 1 log:
2017-04-18 17:42:31.887[0;39m [32m INFO [CS Facade,ff711e7b275d03a7,b3f14f1a5cf6bd1d,true][0;39m [35m6280[0;39m [2m---[0;39m [2m[
Microservice 2 log :
[2m2017-04-18 17:43:26.133[0;39m [32m INFO [-,32226de675c3a463,32226de675c3a463,false][0;39m [35m14184[0;39m [2m---[0;39m [2m[nio-8083-exec-1][0;39m [36mc.t.cloud.resource.HelloResource
Although, both have same request call , traceID is different. It works perfect when both the application are pure spring boot application and no http spring Integration used.
Microservice 1 Code
<int-http:outbound-gateway id="getAccount"
url="http://localhost:8083/rest/hello/micro2"
request-channel="receiveChannel" reply-channel="publishsubscribechannel"
http-method="GET" expected-response-type="java.lang.String">
</int-http:outbound-gateway>
Microservice 2 code
@GetMapping(value = "/micro2")
public String hello() {
LOGGER.info("Reached micro2"+accessor.getCurrentSpan());
return "HelloWorld";
}