- Define traces and spans and how they relate.
- Read a waterfall trace to identify latency and errors.
- Understand root spans, parent/child relationships, and context propagation.

- Each box corresponds to a span, a single unit of work performed by a service.
- Some spans include explicit statuses like OK or Error; many remain Unset (meaning no explicit status recorded).
- An Error status pinpoints where failures happened during the transaction.

- The root span has no parent (parent ID = null).
- Each downstream call creates a child span; sibling spans share the same parent.
- Bar length represents duration; nesting shows sequence and dependency.
- handling an inbound HTTP request,
- executing a database query,
- or calling another service.
- start time and end time (so you can measure duration),
- a status (e.g., Unset, Ok, Error as defined by OpenTelemetry),
- attributes/metadata (for example, HTTP status code, method, URL, database statement).

- The frontend span is the root span that starts when the customer action occurs.
- The frontend creates a child span for the checkout service.
- The checkout service creates additional child spans for payment, shipping, preparing order items, and querying the cart.
- Each span logs start/end times and status, making it straightforward to identify which service caused latency or errors.

- Total checkout latency: ~2.29 seconds.
- The checkout service accounts for most of the latency (~2.27 seconds).
- The email service reports an error—this flags where to investigate for remediation.
A span with a null parent ID is the trace’s root span. Context propagation (trace and span IDs passed across network calls) ties child spans back to their parents so the full distributed trace can be reconstructed across services.
| Term | Meaning | Example fields |
|---|---|---|
| Trace | A complete end-to-end recording of a request across systems | trace_id, spans[] |
| Span | Single unit of work within a trace | span_id, parent_id, start_time, end_time, status, attributes |
| Root span | The top-level span with no parent | parent_id = null |
| Context propagation | Mechanism to carry trace/span IDs across process/network boundaries | HTTP headers like traceparent |
| Baggage | Small pieces of user-defined context propagated with the trace | baggage: { "user-plan": "gold" } |
- Distributed traces reveal the full journey of a request across services, hosts, and processes.
- Traces connect spans to show where time is spent and where failures occur.
- Spans include timing, status, and attributes that make performance and error analysis actionable.
- Hierarchical span structure (root → children → siblings) models causal relationships.
- Status values help distinguish success (
Ok), failure (Error), and unknown (Unset).


- OpenTelemetry: https://opentelemetry.io/ — concepts, SDKs, and spec.
- Tracing basics: https://opentelemetry.io/docs/concepts/signals/traces/
- W3C Trace Context: https://www.w3.org/TR/trace-context/ — standard headers for context propagation.