Advanced

Distributed Tracing

Instrument two Node.js services with OpenTelemetry, run Jaeger v2 as the trace backend, read a multi-service trace as a Gantt chart, and configure head-based sampling so tracing scales to real production traffic.

~5h
0 / 7 steps
🚀
Intro

One Request, Many Services, One Trace

Prerequisites: Metrics and Dashboards with Prometheus.

A single user request in a microservices system might touch five services before a response comes back. Logs and metrics on any one service only show that service's slice; distributed tracing stitches every slice — called a span — into one tree (a trace) so you can see exactly where time was spent and where a failure originated.

You'll use OpenTelemetry for instrumentation (the vendor-neutral standard every major backend now speaks) and Jaeger as the trace backend. Jaeger v2 is the current supported line — it's built directly on the OpenTelemetry Collector framework and ingests OTLP natively, with no separate "enable OTLP" flag required. Jaeger v1 reached end-of-life on 2025-12-31, so v2 is the version to target.

🔨

Run Jaeger v2 and the OpenTelemetry Collector

🔨

Instrument Your Node.js Service

🔨

Read the Trace in Jaeger

🔨

Sampling

🎯
Secret Mission

Secret Mission: Trace Through a Queue

🧹
Wrap Up

Before You Go

Pro

Test what you just learned

Self-testing is one of the best ways to retain new skills. Unlock project quizzes to check your understanding.

Log in to unlock