Tracing a slow requestProLesson 34 of 45, about 8 min
- 1
- 2
- 3
- 4
- 5
- 6
- 7
The app: Beacon, logs, metrics and traces
Beaconharbor · production13:45 UTC
POST /api/checkout latency
750 msaverage, last 5 minutes
at 13:00 it was 380 ms
at 13:00 it was 380 ms
What Beacon stores
Query how Beacon draws the lineaverage
sum(rate(http_server_request_duration_seconds_sum{http_route="/api/checkout"}[5m]))
/
sum(rate(http_server_request_duration_seconds_count{http_route="/api/checkout"}[5m]))
Histogram checkout requests in the last 5 minutes, by duration (s)300 requests
http_server_request_duration_seconds_bucket{http_route="/api/checkout"}
le="0.1" +6
le="0.25" +98
le="0.5" +143
le="0.75" +16
le="1" +3
le="2.5" +2
le="5" +27
le="7.5" +4
le="10" +1
le="+Inf"
http_server_request_duration_seconds_sum 226.1
http_server_request_duration_seconds_count 300
The MagisterThis is Beacon, where Harbor’s metrics, traces and logs live. The chart shows checkout’s average latency, and it looks calm. Averages hide the slow tail: switch to p95, the time 95 of every 100 requests beat. Then tap the histogram line where the slow ones land.
Step 1 of 7Switch to p95, then find the slow requests
- The chart shows p95
- Tap the bucket count that jumps between 2.5 s and 5 s
You’re not signed in, so this lesson won’t be saved to your path. Sign in free to keep your XP.