Log inStart free
LESSON 33.17 · 6 STAGES · 3 CONTROLS · 3 CHECKSPRO · PREVIEW

Distributed tracing

Follow one chat request as a tree of timed spans.


Pro lesson. Stage 1 is free to watch. Pro opens all 6 stages, 3 controls and 3 checks, in this lesson and every other.

Go Pro · $8.25/mo
EXPLAINER · 33.17 · TRACE BAYR25 · ROOT SPAN 12.91 S
01
Stage 1 of 6 · Root span
The gateway opens an OpenTelemetry trace for R25. Its root span lasts 12.91 s, from arrival to the last token.
Explain it simply

Request R25 is a short chat message from the chat app. At the gateway it gets a trace ID, a long random number. The long bar is the root span. It starts when R25 arrives and ends 12.91 s later, when its last token leaves.

One bar: the gateway span of R25, 12.91 s long, with trace ID 29dc8c26….

spans and tracesstreamed tokens; resultsqueue wait; trace not keptrejected (HTTP 429); lost contextsampling rule
0 s5 s10 sgateway12.91 sR25's root spantrace 29dc8c26… · R25 · K1 chat approot span: d = t_end − t_start = 12905.0 − 0 = 12905.0 ms0 s5 s10 sgateway12.91 sR25's root spantrace 29dc8c26… · R25 · K1 chat approot span: d = t_end − t_start = 12905.0 − 0 = 12905.0 ms
Toy: 67 requests in 30 s, 4 GPU replicas, R25 followed
STAGE 1 / 6
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
d=tend−tstart\sy{d}{data}{d} = \sy{e}{data}{t_{\text{end}}} - \sy{s}{data}{t_{\text{start}}}
d=12905.0−0=12905.0 msd = 12905.0 - 0 = 12905.0\ \text{ms}

A span lasts from its start time to its end time.

Common mix-ups

MYTHR25 is slow because its GPU work is slow.

The fix, and 1 more mix-up with the diagram to show them, come with Pro.

Predict, then reveal
3 CHECKS · PRO
Q01If the flood has no rate limit, what happens to R25's GPU spans?

Make your guess, then test it in the diagram. All 3 checks come with Pro.

PRO LESSON · YOU WATCHED STAGE 1 OF 6
Unlock the full explainer
  • 5 more stages and 3 live controls
  • 2 mix-up cards and 3 predict-then-reveal checks
  • Watch it as a narrated video, in three voices
  • Every Pro lesson and capstone · 656 in total

$99 a year, or $15 a month. Cancel any time.