0

The Spring's Sleuth seems like a good solution for MDC (Mapped Diagnostic Context) when working with only Spring Boot microservices.

But we are wondering if it can useful when every microservice is built with a different framework (dropwizard, java spark, ...), or even different language (Node.js...)?

Or the only way to use it, is when all the microservices in the system are built with Spring Boot?

Obviously, non-springboot apps will not be able to support this Sleuth's MDC functionality, and the chain of "traceId" will be lost.

So it seems like the way to work around this, is to keep on passing some "traceId" parameter in all the HTTP calls between the different services.

For example: http://userservice/getuser?id=5&traceId=abc-321 and http://billingservice/getbill?id=5&traceId=abc-321

And then, each microservice has to "reinvent the wheel" in order to handle the MDC issue.

Is this correct, or are we missing something?

riorio
  • 6,500
  • 7
  • 47
  • 100

1 Answers1

0

It's not about Sleuth and MDC. It's about Sleuth being Zipkin compatible. https://zipkin.io/pages/existing_instrumentations.html there's a list of available instrumentations for different languages and frameworks. If you use them then you will propagate the tracing context and things will work fine.

Marcin Grzejszczak
  • 10,624
  • 1
  • 16
  • 32