Observability
Distributed tracing best practices with Jaeger
Checklist for useful tracing: OpenTelemetry instrumentation, span naming, attributes, propagation, sampling, storage and operating Jaeger.
Martin LEKPA3 min readPublished Updated
1. Instrumenting #
Readable traces.
Rules #
- OpenTelemetry everywhere (SDK or auto-instrumentation), never a proprietary client.
- A stable
service.name and resource attributes (service.version, deployment.environment). - Low-cardinality span names (
GET /commandes/{id}, not the full URL). - Business attributes useful for diagnosis, without personal data.
- W3C propagation on all services, including message queues.
2. Operating #
Cost and reliability.
Settings #
- Tail sampling that keeps errors and slow traces.
- 7 to 14 days of retention, daily indices.
- Kafka as a buffer beyond a few thousand spans per second.
- Alerts on refused or unexported spans.
- Links from logs (trace_id) and metrics (exemplars) to Jaeger.
Reference diagram and quick check #
Checklist.
Checklist #
- OpenTelemetry SDK and W3C propagation
- Jaeger v2 with persistent storage
- Sampling defined
- SPM enabled
- Retention and index cleanup
- Collector monitoring
Related articles
The concepts of distributed tracing (trace, span, context, propagation) and Jaeger: its history, its v2 archi…
Run Jaeger v2 as all-in-one, understand its configuration file (jaeger_storage and jaeger_query extensions, O…
Send traces to Jaeger with OpenTelemetry: auto-instrumentation (Java, Python, Node.js), SDK and manual spans,…
Get new articles and courses
A weekly or monthly digest, as you prefer, only when there is something new. Unsubscribe in one click.