Observability / Intermediate / 5 min / Updated
Distributed tracing: spans, waterfalls and the critical path
A checkout request as a trace waterfall. Slow down the database or payments, call services in parallel, and lose the trace header to break the trace.
Start the simulation → Change the load, break a part, watch what happens. Free, no sign-up.
In short
What is distributed tracing?
A trace is a tree of spans, one per unit of work, linked by a trace id and parent ids passed between services.
Why does it matter?
In a microservice request the slow part is hidden behind many hops; a waterfall shows it in one picture.
What is the trade-off?
Every service must propagate context or the trace breaks; spans cost storage, so traces are sampled.
How do you explain it in an interview?
"OpenTelemetry SDKs with W3C traceparent propagation, spans to a collector, Jaeger or Tempo, critical path first."
Check yourself
What links the spans of one request across services?
Answer: A trace id and parent span id passed in a header such as traceparent. Every service reads the incoming context and passes it on; one service that drops it breaks the trace.
What is the critical path in a trace?
Answer: The chain of spans that decides the total time. Speeding up anything off the critical path does not make the request faster.
Two independent calls run one after another. What does the waterfall suggest?
Answer: Run them in parallel so their bars overlap. Independent calls can overlap; the total becomes the longer of the two instead of the sum.