The lab builds requests that fan out across tiers of services. You set the depth, the fan-out and whether calls are parallel, sequential or alternating. Each call has its own latency, and a small share of calls take a slow path. Every request becomes a trace of spans.
The waterfall shows one trace at a time. Filled bars are time on the critical path. Below it, the tail-at-scale chart and the sampler comparison read the whole stream.
Predict before you press play
13 spans per request (12 calls below the gateway)typical 68.6 msslow trace: over 137 ms
p50
75.7 ms
p95
181 ms
p99
258 ms
slow traces
9%
slowest call on path
74%
One trace, drawn as a waterfall
Filled bars are time spent on the critical path. Outlined bars finish while something else is still running. A red outline marks a call that took its slow path.
The filled parts add up to 155 ms, which is the end-to-end latency of 155 ms. The slowest call by its own time is db (111 ms), and it is on the critical path.
Spans of one trace, in call order. Times are milliseconds since the request began.
Span
Depth
Start
End
Own time
Critical path
Slow path
gateway
0
0.0
154.8
3.5
yes
no
catalog
1
1.4
69.8
9.9
no
no
index
2
5.4
27.4
22.1
no
no
cache
2
27.4
41.3
13.9
no
no
db
2
41.3
63.9
22.6
no
no
pricing
1
1.4
48.7
13.8
no
no
index
2
6.9
18.6
11.7
no
no
cache
2
18.6
26.5
7.9
no
no
db
2
26.5
40.4
13.8
no
no
search
1
1.4
152.7
6.2
yes
no
index
2
3.9
18.3
14.4
yes
no
cache
2
18.3
38.2
19.9
yes
no
db
2
38.2
149.0
110.8
yes
yes
The tail at scale
Chance a request waits on at least one slow call
1 - (1 - p)^N
Measured
Chance a request waits on at least one slow call (share of requests against parallel calls per request, N)
Series
Latest
Lowest
Highest
1 - (1 - p)^N
63%
1%
63%
Measured
64%
1%
64%
Share of requests with at least one slow call, measured and from the formula
N
1
2
5
10
20
50
100
Measured
1%
2%
5%
11%
19%
39%
64%
Formula
1%
2%
5%
10%
18%
39%
63%
Measured over 600 requests for each N. A request is slow here if at least one of its N parallel calls took the slow path, which one call in 100 does. In the call tree above, 11.7% of requests had at least one slow call, and 1 - (1 - p)12 predicts 11.4%.
What each sampler keeps
Head sampling
Decides at the first span, before the outcome is known. Keeps 10% of traces at random.
stored
134 of 1200
slow traces kept
8%
kept that are slow
6%
Tail sampling
Decides once the trace is complete. Keeps every slow trace and 2% of the rest.