docker.recipes

Jaeger Tracing

intermediate

Distributed tracing system for microservices.

Overview

Jaeger is an open-source distributed tracing platform originally developed by Uber Technologies to monitor and troubleshoot complex microservices architectures. Born from the need to understand request flows across hundreds of services in production, Jaeger implements OpenTracing standards and provides comprehensive visibility into distributed system performance, latency bottlenecks, and failure points. The platform captures timing data, service dependencies, and error propagation across service boundaries, making it essential for debugging distributed applications. This Jaeger all-in-one deployment combines the collector, query service, and web UI into a single container, creating a complete tracing solution for development and small-scale production environments. The configuration supports multiple ingestion protocols including native Jaeger formats over UDP and gRPC, Zipkin-compatible HTTP endpoints, and OpenTelemetry Protocol (OTLP) collectors. This multi-protocol approach allows applications instrumented with different tracing libraries to send data to the same Jaeger instance without modification. Development teams working with microservices, platform engineers implementing observability strategies, and DevOps professionals troubleshooting distributed system issues will find this stack invaluable. The all-in-one image eliminates the complexity of deploying separate Jaeger components while maintaining full compatibility with production Jaeger deployments, making it perfect for local development, CI/CD pipeline integration, and proof-of-concept implementations before scaling to multi-component production architectures.

Key Features

  • Multi-protocol trace ingestion supporting Jaeger thrift over UDP (6831), gRPC (14250), and HTTP (14268)
  • Zipkin-compatible collector endpoint on port 9411 for applications using Zipkin instrumentation
  • OpenTelemetry Protocol support for modern OTEL-instrumented applications
  • Interactive web UI with advanced trace search, filtering, and dependency graph visualization
  • Real-time service dependency mapping showing request flow patterns and service interactions
  • Jaeger agent capabilities built-in for local trace buffering and batching
  • Memory-based storage for fast query performance in development environments
  • Health check endpoints and metrics exposure for monitoring Jaeger itself

Common Use Cases

  • 1Local microservices development with distributed tracing across multiple services
  • 2CI/CD integration testing to validate trace collection from automated test suites
  • 3Performance regression testing by comparing trace timing data across application versions
  • 4Root cause analysis for intermittent failures in distributed applications
  • 5Service dependency discovery and documentation in complex microservices architectures
  • 6OpenTelemetry implementation proof-of-concepts before production rollout
  • 7Training and demonstration environments for distributed tracing concepts

Prerequisites

  • Docker host with at least 512MB available RAM for the all-in-one container
  • Multiple UDP ports (5775, 6831, 6832) and TCP ports (5778, 16686, 14250, 14268, 14269, 9411) available
  • Applications instrumented with Jaeger, Zipkin, or OpenTelemetry tracing libraries
  • Basic understanding of distributed tracing concepts and span/trace relationships
  • Network connectivity between application containers and Jaeger container on Docker bridge network
  • Understanding that memory storage means traces are lost on container restart

For development & testing. Review security settings, change default credentials, and test thoroughly before production use. See Terms

docker-compose.yml

docker-compose.yml
1services:
2 jaeger:
3 image: jaegertracing/all-in-one:latest
4 container_name: jaeger
5 restart: unless-stopped
6 environment:
7 COLLECTOR_ZIPKIN_HOST_PORT: 9411
8 ports:
9 - "5775:5775/udp"
10 - "6831:6831/udp"
11 - "6832:6832/udp"
12 - "5778:5778"
13 - "16686:16686"
14 - "14250:14250"
15 - "14268:14268"
16 - "14269:14269"
17 - "9411:9411"
18
19networks:
20 default:
21 driver: bridge

.env Template

.env
1# No environment variables required

Usage Notes

  1. 1Docs: https://www.jaegertracing.io/docs/
  2. 2UI at http://localhost:16686 - search and visualize traces
  3. 3Send Jaeger traces: UDP 6831 (thrift), gRPC 14250
  4. 4Zipkin-compatible endpoint on port 9411
  5. 5OpenTelemetry SDK: export to OTLP endpoint port 4317/4318
  6. 6all-in-one image stores data in memory - use production backends for persistence

Quick Start

terminal
1# 1. Create the compose file
2cat > docker-compose.yml << 'EOF'
3services:
4 jaeger:
5 image: jaegertracing/all-in-one:latest
6 container_name: jaeger
7 restart: unless-stopped
8 environment:
9 COLLECTOR_ZIPKIN_HOST_PORT: 9411
10 ports:
11 - "5775:5775/udp"
12 - "6831:6831/udp"
13 - "6832:6832/udp"
14 - "5778:5778"
15 - "16686:16686"
16 - "14250:14250"
17 - "14268:14268"
18 - "14269:14269"
19 - "9411:9411"
20
21networks:
22 default:
23 driver: bridge
24EOF
25
26# 2. Create the .env file
27cat > .env << 'EOF'
28# No environment variables required
29EOF
30
31# 3. Start the services
32docker compose up -d
33
34# 4. View logs
35docker compose logs -f

One-Liner

Run this command to download and set up the recipe in one step:

terminal
1curl -fsSL https://docker.recipes/api/recipes/jaeger-tracing/run | bash

Troubleshooting

  • No traces appearing in UI: Verify application is sending traces to correct endpoint (UDP 6831 for Jaeger, HTTP 9411 for Zipkin, gRPC 4317 for OTEL)
  • Container fails to start with port binding errors: Check if ports 16686, 6831, or 9411 are already in use by other services
  • Traces disappearing after container restart: All-in-one uses memory storage - implement volume mounting or switch to persistent backend for data retention
  • High memory usage warnings: Reduce trace retention period or implement sampling strategies in client applications
  • UDP traces not collected: Ensure Docker host allows UDP traffic and check firewall rules for ports 6831 and 6832
  • OpenTelemetry traces not appearing: Verify OTLP exporter is configured to send to http://localhost:14268/api/traces or gRPC port 14250

Community Notes

Loading...
Loading notes...

Download Recipe Kit

Get all files in a ready-to-deploy package

Includes docker-compose.yml, .env template, README, and license

Ad Space