OpenTelemetry Distributed Tracing in 45 Minutes
OTel tracing across two services. The 45 minutes cover instrumentation, collector, and viewing in Jaeger.
Step 1: SDK in service A
Install OTel SDK for your language.
Initialize tracer; instrument HTTP server.
Step 2: SDK in service B
- Same as A but different serviceName.
- Instrument HTTP client (auto-injects W3C Traceparent).
Step 3: Collector + Jaeger
Run OTel Collector + Jaeger via Docker Compose.
Both services export to Collector; Collector forwards to Jaeger.
Step 4: Trace propagation
Service A’s outbound HTTP call carries Traceparent.
Service B reads it; new span becomes child of A’s span.
Jaeger UI: see the cross-service trace.
Antipatterns
- Manual instrumentation everywhere. Use auto-instrumentation libraries.
- No sampling. Cost.
- Skipping context propagation in async. Trace breaks.
What to do this week
Three moves. (1) Run the tutorial end-to-end on your own laptop / sandbox. (2) Apply the pattern to one production workload. (3) Document the variations you needed; share with the team.