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.
addition
container. This service gets two integers fromx
andy
query string and returns sum of them.multiplication
container. This service get two integers fromx
andy
query string and returns product of them. It usesaddition
service to calculate the result.jaeger
container. 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