Trace a request across services with OpenTelemetry

8 steps · about 2 h 44 min · Intermediate

  1. Place traces in the observability model (guide, OpenTelemetry documentation, 18 min)

    Distinguish signals and understand what a trace can and cannot prove about a distributed request.

  2. Read traces, spans and links (guide, OpenTelemetry specification, 20 min)

    Learn the identifiers, timing, status, events and relationships needed for a useful trace.

  3. Propagate context across service calls (guide, OpenTelemetry documentation, 18 min)

    Keep parent-child relationships intact across process and network boundaries.

  4. Choose automatic and manual instrumentation (guide, OpenTelemetry documentation, 18 min)

    Start with supported libraries and add manual spans only around missing business or dependency boundaries.

  5. Introduce the Collector (guide, OpenTelemetry documentation, 20 min)

    Receive, process and export telemetry through a controlled component instead of coupling each service to a backend.

  6. Apply span naming and attribute rules (reference, OpenTelemetry specification, 24 min)

    Create stable spans and avoid high-cardinality or sensitive fields that make traces costly or unsafe.

  7. Keep sensitive data out of telemetry (guide, OpenTelemetry documentation, 16 min)

    Review collection points and processor controls before request data reaches an exporter.

  8. Investigate one slow or failed request (tutorial, OpenTelemetry documentation, 30 min)

    Instrument a lab service, follow a trace across boundaries, compare span timing and state the bottleneck with evidence.