Dit deel is nog niet vertaald. Je ziet de Engelse tekst.
$ als gewone gebruiker# als root (of met sudo)
Know it before you install
A trace is made of spans (one operation each: an HTTP call, a DB query) with start time, duration, attributes and the parent span. Apps create spans with the OpenTelemetry SDK and send them (OTLP) to Jaeger — or to an OTel Collector that forwards them. Jaeger stores them and the UI lets you search and compare.
| Item | Value |
|---|---|
| Image / binary | jaegertracing/jaeger (v2, one binary for all roles) |
| Ports | 16686 (UI), 4317 (OTLP gRPC), 4318 (OTLP HTTP) |
| Storage | memory (labs), Badger (single node), Elasticsearch / OpenSearch / Cassandra (production) |
| Config | a YAML file in the OpenTelemetry Collector format (v2) |
| Alternatives | Grafana Tempo (cheap object storage, Grafana UI) — the same OTLP data works for both |
Notitie
Jaeger v1 reached end of life; use v2. Apps should use the OpenTelemetry SDKs (the old Jaeger client libraries are retired).
Run it for a lab (RHEL and Ubuntu)
With Docker (see the Docker guide) — all-in-one, data in memory:
docker run -d --name jaeger -p 127.0.0.1:16686:16686 -p 4317:4317 -p 4318:4318 jaegertracing/jaeger:2.11.0
curl -s http://127.0.0.1:16686/api/services
{"data":["jaeger"], …}Open http://127.0.0.1:16686 (SSH tunnel on a server). Data is lost when the container stops — fine for a lab.
First configuration: production storage
For real use, store traces in Elasticsearch or OpenSearch (see the Elasticsearch guide) with a config file:
service:
extensions: [jaeger_storage, jaeger_query, healthcheckv2]
pipelines:
traces:
receivers: [otlp]
processors: [batch]
exporters: [jaeger_storage_exporter]
extensions:
healthcheckv2:
use_v2: true
http:
endpoint: 0.0.0.0:13133
jaeger_query:
storage:
traces: es_main
jaeger_storage:
backends:
es_main:
elasticsearch:
server_urls: ["https://es1.example.com:9200"]
auth:
basic:
username: jaeger
password: ${env:JAEGER_ES_PASSWORD}
tls:
ca_file: /etc/jaeger/es-ca.crt
indices:
index_prefix: jaeger
spans:
date_layout: "2006-01-02"
rollover_frequency: "day"
receivers:
otlp:
protocols:
grpc: { endpoint: 0.0.0.0:4317 }
http: { endpoint: 0.0.0.0:4318 }
processors:
batch: {}
exporters:
jaeger_storage_exporter:
trace_storage: es_maindocker run -d --name jaeger --restart unless-stopped -e JAEGER_ES_PASSWORD -v /etc/jaeger:/etc/jaeger:ro -p 127.0.0.1:16686:16686 -p 4317:4317 -p 4318:4318 jaegertracing/jaeger:2.11.0 --config /etc/jaeger/config.yaml| Part | Why |
|---|---|
jaeger_storage backend | Where traces live; one daily index makes deleting old data easy. |
jaeger_query | The UI and API (port 16686). |
otlp receiver | Apps (or a Collector) send OTLP here. |
Password from ${env:…} | No secret in the file. |
The config keys change between Jaeger versions — compare with the example files in the Jaeger repository (cmd/jaeger/config-elasticsearch.yaml, config-opensearch.yaml) for your version.
Delete old indices with an ILM/ISM policy (for example 7–14 days of traces). Put the UI behind Nginx with HTTPS and a login (SSO via oauth2-proxy) — the Jaeger UI has no login of its own. In Kubernetes use the Jaeger Helm chart or the OpenTelemetry Operator.
Send traces from an app
Auto-instrumentation with environment variables (Python example; Java, Node.js, .NET and Go are similar):
pip install opentelemetry-distro opentelemetry-exporter-otlp
opentelemetry-bootstrap -a install
export OTEL_SERVICE_NAME=shop-api
export OTEL_EXPORTER_OTLP_ENDPOINT=http://jaeger.example.com:4318
export OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf
export OTEL_TRACES_SAMPLER=parentbased_traceidratio
export OTEL_TRACES_SAMPLER_ARG=0.1
opentelemetry-instrument python app.pytraceidratio 0.1 keeps 10 % of traces — enough to see patterns on busy systems; use 1.0 in labs. Every service in the chain must propagate the trace context (W3C traceparent header) — the OTel libraries do it.
Daily use: search traces and the real uses
In the UI: choose the Service, an Operation, filter by Tags (http.status_code=500, error=true), Min Duration (> 1s) and a time range. Open a trace: the timeline shows the slow span; Compare shows two traces side by side; System Architecture draws the service map.
curl -s http://127.0.0.1:16686/api/services | jq .
curl -s 'http://127.0.0.1:16686/api/traces?service=shop-api&limit=5&tags=%7B%22error%22%3A%22true%22%7D' | jq '.data[].traceID'
curl -s http://127.0.0.1:13133/status
docker logs --tail 50 jaegerReal uses at work:
- Find which microservice makes a request slow, or where an error starts.
- Find N+1 database queries and slow external APIs.
- Link traces with logs (trace ID in log lines) and metrics (exemplars in Grafana).
Make it safe
Security checklist:
- OTLP ports only from app networks (or behind a Collector gateway); TLS across networks.
- The UI has no login: Nginx + SSO in front, or localhost only.
- Scrub secrets and personal data from span attributes (in the SDK or an OTel Collector).
- Retention on storage (7–14 days); size the backend for your sampling rate.
- Pin the image version; keep Jaeger and the storage updated.
Update and remove
Fix common problems
| Problem | Cause | Fix |
|---|---|---|
| No services in the UI | Apps do not send, wrong endpoint/port, or firewall. | Check OTEL_EXPORTER_OTLP_ENDPOINT and protocol (4317 gRPC / 4318 HTTP); curl the port from the app host. |
| Traces are cut in pieces (one service per trace) | Context not propagated between services. | Use OTel instrumentation in every service; keep the traceparent header through proxies. |
| Only a few traces | Sampling ratio. | Raise OTEL_TRACES_SAMPLER_ARG (or use tail sampling in a Collector). |
| All traces gone after restart | Memory storage (all-in-one lab). | Use Badger or Elasticsearch/OpenSearch storage. |
| Storage errors in the log | Elasticsearch auth/TLS or index permissions. | Check user rights for jaeger-* indices, CA file, password variable. |
Next steps
- Quick how-tos: Trace requests with OpenTelemetry.
- The pipe in front: OpenTelemetry Collector. Storage: Elasticsearch.
- Metrics and logs next to traces: Prometheus, Loki, Grafana.
- At work: Observability services.
1A trace shows only one service although the request went through three. Why?
The trace context was not propagated; every service must use OTel instrumentation and keep the traceparent header.
2Why use sampling (for example 10 %) in production?
To keep cost and storage low on busy systems while still seeing the patterns.