SpringBoot - SpringCloud Sleuth Zipkin - Tracing - Passing around traceId

287 Views Asked by At

Quick question on how to pass around the original trace id traceId please.

The entire end to end flow is a call between a client ClientA to three other micro services (four in total).

ClientA (team A) -> Service B1 (team B) -> Service B2 (team B) -> Service C (team C)

Team A owns the client, the originator of the call, team C owns the last service.

My group, team B owns two out of the four micro services.

All subsequent micro services just perform computation and aggregate the response of each other back to the caller, ClientA.

Our team, B, had two micro services, hence we were the first out of the four to use Spring Cloud Sleuth and Zipkin.

Very happy, we could see out of the four services, in our services only, the traceId.

[serviceBone,24ccc8d03f686f2e,...]  
[serviceBtwo,24ccc8d03f686f2e,...] 

This is helping us in debugging, timing calls, etc, very happy.

Since everyone saw benefits, now ClientA and ServiceC (the two others we do not own) also integrated with Sleuth-Zipkin.

Unfortunately, it seems we are not able to "chain everything".

We looked at each others traceId, and saw something like:

[clientA,31f79eac76b305a9,...]  

[serviceBone,d5396495f621e993,...]  
[serviceBtwo,d5396495f621e993,...] 

[serviceC,fb381ef109c13eef,...]

Hence, we are now all very puzzled. As we thought we would see something like:

[clientA,31f79eac76b305a9,...]  

[serviceBone,31f79eac76b305a9,...]  
[serviceBtwo,31f79eac76b305a9,...] 

[serviceC,31f79eac76b305a9,...]

Since for the two servicesB1 and B2, we did not do anything in particular, out of the box, we could see same traceId between the two, we thought, out of the box, we would be able to see between the four services.

May I ask, is my understanding not correct?

What did I miss please?

Do I have to do anything special, if yes, what, in order to ask ClientA to send me its traceId?

Or maybe ClientA is already sending it, I am not getting it properly? (same applies to ServiceC)

Thank you for your help.

0

There are 0 best solutions below