Skip to content

What is Jaeger

Key idea:

Jaeger — open-source distributed tracing system from Uber (2015), CNCF graduated since 2019. Shows the path of one request across many microservices as a tree of spans with timings. Used for: debugging slow requests, finding bottlenecks, understanding service dependencies. Alternatives: Zipkin (Twitter, similar), Tempo (Grafana, cheaper storage).

Below: details, example, related terms, FAQ.

Check your site →

Details

  • Spans: unit of work with duration, tags, logs
  • Trace: collection of spans for one request
  • Service map: auto-generated from spans — see how services connect
  • Storage backends: Cassandra, Elasticsearch, Kafka, memory
  • Sampling: default 1% to avoid overloading storage

Example

// Python example (OpenTelemetry)
from opentelemetry import trace
tracer = trace.get_tracer(__name__)
with tracer.start_as_current_span('payment.charge') as span:
    span.set_attribute('user.id', user_id)
    result = stripe.charge(amount)
    span.set_status(Status(StatusCode.OK))

Related Terms

How Jaeger Works: Architecture and Components

Jaeger operates on a microservices architecture, providing a robust platform for distributed tracing. At its core, Jaeger consists of several key components:

  • Jaeger Client: Libraries integrated into your application code that send tracing data to the Jaeger backend.
  • Jaeger Agent: A network daemon that listens for trace data sent by clients and batches it before forwarding it to the collector.
  • Jaeger Collector: Receives trace data from agents, processes it, and stores it in the backend storage.
  • Storage Backend: Where the trace data is stored; Jaeger supports various backends including Elasticsearch, Cassandra, and more.
  • Jaeger UI: A web-based interface that allows users to visualize traces, analyze performance, and troubleshoot issues.

When an application sends a request, the Jaeger client generates a unique trace ID and records spans, which represent the time taken by each operation. These spans are sent to the Jaeger Agent, which forwards them to the Collector. The Collector processes this data and stores it in the configured storage backend. The Jaeger UI can then be used to visualize the traces, showing the request flow across services and highlighting performance bottlenecks.

Practical Examples: Setting Up Jaeger for Your Application

Integrating Jaeger into your application can significantly enhance your tracing capabilities. Here’s how to set it up using different programming languages:

1. Java Example

To instrument a Java application, include the Jaeger client dependency in your pom.xml:

<dependency>
<groupId>io.jaegertracing</groupId>
<artifactId>jaeger-client</artifactId>
<version>1.6.0</version>
</dependency>

Then, initialize the tracer in your application:

import io.jaegertracing.Configuration;
import io.opentracing.Tracer;

Tracer tracer = Configuration.fromEnv().getTracer();

2. Python Example

For a Python application, install the Jaeger client using pip:

pip install jaeger-client

Then, set up the tracer as follows:

from jaeger_client import Config

config = Config(config={'sampler': {'type': 'const', 'param': 1}, 'logging': True})
tracer = config.initialize_tracer()

With these setups, you can begin creating spans around your requests to trace their execution across microservices.

Common Use Cases for Jaeger in Microservices

Jaeger is invaluable in microservices environments, providing insights that enhance performance and reliability. Here are some common use cases:

  • Performance Optimization: By visualizing the latency of requests across services, teams can identify slow components and optimize them, improving overall application performance.
  • Bottleneck Identification: Jaeger allows developers to pinpoint where requests are slowing down, enabling targeted fixes that enhance throughput.
  • Service Dependency Analysis: Understanding how services interact is crucial for maintaining system health. Jaeger visualizes service dependencies, helping teams comprehend the architecture and potential points of failure.
  • Error Tracking: By correlating errors with specific traces, developers can quickly identify the root causes of issues and resolve them efficiently.
  • Load Testing: During load testing, Jaeger can help visualize how the system behaves under stress, providing insights into performance degradation and guiding scaling strategies.

These use cases illustrate how Jaeger can be leveraged to improve microservices architecture, leading to more resilient and efficient applications.

Learn more

Frequently Asked Questions

Jaeger vs Zipkin?

Similar. Jaeger has more active development (Uber/CNCF), Zipkin older + simpler UI. Both support OpenTelemetry.

Storage overhead?

With 1% sampling: 500 req/s app → ~5 traces/s → few GB/day. At higher samples — TB/week.

Jaeger alternative?

Grafana Tempo — cheaper (block storage, not DB), integrates with Grafana. Used by DoorDash, Reddit. New stack: Tempo instead of Jaeger.

Try the live tool that powered this guide

Free plan — 10 monitors, checks every 5 min, no card required. Upgrade for 1-minute interval and multi-region monitoring.