Skip to content

Docker With Jaeger#

What Is The Jaeger?#

  • Jaeger is an open-source, end-to-end distributed tracing system that is used to monitor and troubleshoot microservices-based distributed systems. It was originally developed by Uber and is now part of the Cloud Native Computing Foundation (CNCF).
  • Jaeger is designed to help developers and DevOps engineers to trace the flow of requests across complex distributed systems and identify performance issues and errors in real-time. Jaeger uses the OpenTracing API to enable developers to instrument their applications and send tracing data to the Jaeger backend, where it can be visualized and analyzed using a web-based UI.
  • More information

Create Jaeger Server With Docker Compose#

  • Let's create a file name docker-compose.yml, then add scripts as below:
docker-compose.yml
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
version: '3.7'

services:

  jaeger-all-in-one:
    image: jaegertracing/all-in-one:latest
    environment:
      - "COLLECTOR_ZIPKIN_HOST_PORT=:9411"
      - "COLLECTOR_OTLP_ENABLED=true"
    ports:
      - "5775:5775"
      - "6831:6831"
      - "6832:6832"
      - "5778:5778"
      - "16686:16686"
      - "14268:14268"
      - "14250:14250"
      - "9411:9411"
  • As you can see, the docker compose file above defines a single service called jaeger-all-in-one which uses the Jaeger All-in-One image (jaegertracing/all-in-one:latest). The environment variables set in this service configure the Jaeger collector to send data to the Zipkin port 9411 and enable the OpenTelemetry protocol (OTLP).
  • The service exposes several ports to enable access to different components of the Jaeger stack:
Port Description
5775 The Jaeger compact thrift port
6831 The Jaeger binary thrift port
6832 The Jaeger binary thrift over UDP port
5778 The Jaeger config HTTP port
16686 The Jaeger query HTTP port
14268 The Jaeger collector HTTP port
14250 The Jaeger agent compact thrift port
9411 The Zipkin HTTP port for compatibility with Zipkin clients.

Testing#

  • Now you can use command docker-compose up to start your Jaeger server. Then access the URL http://localhost:16686 then you will be the Jaeger UI as below.

 #zoom

References#