DevOps: distributed tracing
This course covers distributed tracing for a Rails application using OpenTelemetry. It explains how a trace breaks one request into nested, timed spans, and how context crosses process boundaries through the W3C traceparent header. It shows automatic and manual instrumentation, head and tail sampling, and the role of the OpenTelemetry Collector. It teaches how to read a waterfall through self time and shapes such as N+1 staircases and gaps. It ends by connecting metrics, traces and logs through trace_id and applying the full setup to a slow page.
What you'll learn
- ✓How spans, traces and the traceparent header fit together
- ✓Instrumenting Rails with the OpenTelemetry SDK and manual spans
- ✓Carrying trace context into background jobs
- ✓Head sampling, tail sampling and the OpenTelemetry Collector
- ✓Reading a waterfall through self time and recognizable shapes
- ✓Connecting metrics, traces and logs through trace_id
Logs say what happened; traces say where the time went
The previous course ended with structured, correlated logs. They answer what happened, in what order, to whom. Here is what they do not answer.
Read the full lesson free →Curriculum
7 lessonsLogs say what happened; traces say where the time went
Shows why a log line reports a slow request but not which call inside it took the time.
Spans, traces, and context
Defines spans and traces, span naming by route, the traceparent header, and boundaries where context gets lost.
Instrumenting a Rails application
Sets up the OpenTelemetry SDK in Rails, adds manual spans to domain objects, and handles job context propagation.
Sampling, and what it costs
Compares head and tail sampling, explains why errors must always be kept, and introduces the OpenTelemetry Collector.
Reading a trace
Reads a trace waterfall through self time and four shapes, starting from aggregates and percentiles instead of averages.
The three signals together
Connects metrics, traces and logs through exemplars and trace_id, and treats cardinality as one shared failure.
Putting it together: tracing this application
Applies the full setup to this application and traces the slow page from metric to logs in four steps.