Jaeger Tracing

The Jaeger tracing system is an open-source tracing system for microservices, and it supports the OpenTracing standard

Jaeger Tracing Glossary

Agent – A network daemon that listens for spans sent over User Datagram Protocol.

Client – The component that implements the OpenTracing API for distributed tracing.

Collector – The component that receives spans and adds them into a queue to be processed.

Console – A UI that enables users to visualize their distributed tracing data.

Query – A service that fetches traces from storage.

Span – The logical unit of work in Jaeger, which includes the name, starting time and duration of the operation.

Trace – The way Jaeger presents execution requests. A trace is composed of at least one span

 

Jaeger deployment

  1. Add below Jaeger configs in your env config file (eg. qa.yaml, dev.yaml and, etc…)

    1. jaeger: host: "" port: "" sampler-type: "" sampler-param: "" collector: samplingConfig: | { "service_strategies": [ { "service": "tl-services", "type": "probabilistic", "param": 0.5 }, { "service": "tl-calculator", "type": "probabilistic", "param": 0.5 }, { "service": "report-service", "type": "probabilistic", "param": 0.5 }, { "service": "pt-services-v2", "type": "probabilistic", "param": 0.5 }, { "service": "pt-calculator-v2", "type": "probabilistic", "param": 0.5 }, { "service": "collection-services", "type": "probabilistic", "param": 0.2 }, { "service": "billing-service", "type": "probabilistic", "param": 0.2 }, { "service": "egov-data-uploader", "type": "probabilistic", "param": 0.2 }, { "service": "egov-hrms", "type": "probabilistic", "param": 0.5 }, { "service": "rainmaker-pgr", "type": "probabilistic", "param": 0.5 } ], "default_strategy": { "type": "probabilistic", "param": 0.05 } }

       

  2. Deploy the Jaeger using go cmd or deploy using Jenkins.

 

  1. Deploy using go lang deployer

    1. go run main.go deploy -e <environment_name> -c 'Jaeger'
  2. Deploy using Jenkin’s respective deployment job

 

you can connect to the Jaeger console a https://<your_domin_name>/tracing/

 

Look at the box on the left-hand side of the page labeled Search. The first control, a chooser, lists the services available for tracing, click the chooser and you’ll see the listed services.

Select the service and click the Find Traces button on the bottom of the form. You can now compare the duration of traces through the graph shown above. You can also filter traces using “Tags” section under “Find Traces”. For example, Setting the “error=true” tag will filter out all the jobs that have errors.

To view the detailed trace, you can select a specific trace instance and check details like the time taken by each service, errors during execution and logs.

 

Reference Docs:

https://medium.com/velotio-perspectives/a-comprehensive-tutorial-to-implementing-opentracing-with-jaeger-a01752e1a8ce

https://www.scalyr.com/blog/jaeger-tracing-tutorial/