Tracing the Stages of an End-to-End Request

A request trace can associate stages and elapsed intervals with one observed operation so repeated slow paths can be inspected.

Source
Anbloq
Language
English
Created
Updated
Chapters
4
Reading time
1 min
In this article4 chapters
  1. Trace a three-stage read
  2. Check overlap
  3. Establish phase boundaries along one request
  4. Avoid summing intervals that overlap

Trace a three-stage read

Routing can take five milliseconds, a query twenty, and rendering ten. A simplified sequential sum is thirty-five. A correlation identifier can associate the events across components.

Check overlap

If two dependency stages run simultaneously, adding durations can overstate waiting time. Inspect their placement on a shared timeline when available. See parallel dependency latency.[1]

Establish phase boundaries along one request

A search request waits four milliseconds for admission, spends eleven in a query, five building a view and three sending its body under an idealized serial trace. Adding these gives twenty-three milliseconds. See correlated service logs.

Queue 0–4 ms
Query 4–15 ms
Render 15–20 ms
Send 20–23 ms
Observed elapsed 23 ms

Avoid summing intervals that overlap

Parallel service requests can share elapsed time even if each records a duration. Use parent and child timing relationships when possible. Verify the trace includes the user's first and last observable work.

References

  1. Google, Site Reliability Engineering ↩