Skip to content
BENIBIX Learn

Distributed Tracing

Infrastructure📈 Monitoring & ObservabilityTelemetry Signals

Also known as Tracing, Trace, Span, Request Tracing

Following one request through each part of an app. Each step shows its time.

Think of it like

It is like a parcel tracker. You see every stop the box made and how long it waited at each one.

Example

Checkout takes 3 seconds. The trace shows 2.6 of them are one database query in the stock service, so Jack fixes that query.

Why it matters

Many apps are made of lots of small parts. This is the one way to see which part made a request slow.

Definition

Distributed tracing follows one request as it moves through many services. The whole journey is called a trace. Each step inside it, like a database call, is a span with a start time and an end time. A shared trace ID is passed along with the request, so the steps can be joined up. Drawn as bars, a trace shows where the time went.

Example code

http
traceparent: 00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01
The header that carries the trace ID from one service to the next, so the steps can be joined.
Traces are the right panel. Each bar is one step, and the longest bar is where the time went.

Common mistake

Tracing only some services. The trace then has gaps, and the slow step is often in the gap.

Key takeaways

  1. 1
    One request. A trace follows a single journey.
  2. 2
    Spans. Each step has its own start and end.
  3. 3
    Pass the ID. Every service sends the trace ID on.