Distributed tracing, also called distributed request tracing, is a method used to profile and monitor applications, especially those built using a microservices architecture. Distributed tracing helps pinpoint where failures occur and what causes poor performance.
You can run this application locally with docker-compose. docker-compose up command would run the following three containers.
additioncontainer. This service gets two integers fromxandyquery string and returns sum of them.multiplicationcontainer. This service get two integers fromxandyquery string and returns product of them. It usesadditionservice to calculate the result.jaegercontainer. You can check the trace onhttp://localhost:16686/
In order to trace across process boundaries in distributed systems, services need to be able to continue the trace injected by the client that sent each request. That's why multiplication service injects its context to the HTTP request and addition service extracts it.
Source: OpenTracing.io
