3.7 KiB
Lab 6 — evidence for grade 5, track 2
Date: 2026-11-12. Environment: local Docker Compose, alternate loopback ports 18080/13000/19090/13100/13200.
Configuration
- Track: SLO and incident detection.
- Policy window: 7 days, matching Prometheus retention.
- API SLO: 99% non-5xx, 1% error budget, recording rule
messenger:slo_api_success_ratio_7d. - Attachment SLO: 99% ready in no more than 10 seconds, 1% error budget, recording rule
messenger:slo_attachment_ready_ratio_7d. - Fast burn: 14.4x, 30s + 2m,
for: 10s. - Slow burn: 6x, 1m + 5m,
for: 20s. - Prometheus validation: PASS, 17 rules after the final audit.
- Grafana dashboard:
mtusi-lab6-grade5provisioned. - Runbook:
infrastructure/telemetry/runbooks/level5.md.
The windows are intentionally compressed for a repeatable laboratory experiment. Burn factors remain dimensionless; production windows would be substantially longer.
Reproducible command
make test-slo-burn-rate \
BASE_URL=http://127.0.0.1:18080 \
PROMETHEUS_URL=http://127.0.0.1:19090 \
LOKI_URL=http://127.0.0.1:13100 \
TEMPO_URL=http://127.0.0.1:13200 \
GRAFANA_URL=http://127.0.0.1:13000
Result: PASS.
{
"api_slo": {
"brief_spike_failures": 4,
"false_positive": {
"pending_or_firing": 0,
"max_30s_ratio": 0.038461538461538464,
"max_5m_ratio": 0.007827788649706457
},
"sustained_failures": 136,
"detection_seconds": {
"MessengerAPIBurnRateSlow": 42.194,
"MessengerAPIBurnRateFast": 52.212
},
"recovery_seconds": 38.851,
"trace_id": "abac9b8b51c9b4bd3d05c26dab3e37ea",
"root_cause_span": "postgresql.acquire"
},
"attachment_ready_slo": {
"baseline_fast": 20,
"slow_over_10s": 5,
"recovery_fast": 100,
"detection_seconds": {
"MessengerAttachmentReadyBurnRateFast": 20.039,
"MessengerAttachmentReadyBurnRateSlow": 30.056
},
"recovery_seconds": 8.016,
"final_5m_slow_ratio": 0.04794240000000012
}
}
Interpretation
The bounded four-error spike remained below both burn thresholds and produced no pending/firing state during the observation window. Sustained PostgreSQL unavailability fired both API alerts; Loki correlation and Tempo identified postgresql.acquire, so the runbook distinguishes pool/backend failure from handler latency.
Five delayed jobs consumed the ready SLO budget and fired both ready alerts. One hundred fast completions reduced the five-minute slow ratio below 6%, after which both alerts resolved.
False-positive evidence covers this controlled workload only. It is not a statistically significant production false-positive rate. No independent human runbook drill was performed; the black-box script follows the same steps automatically.
Histogram calibration
make test-histogram-calibration ...: PASS.
{
"samples": {"http": 400, "attachments": 12},
"http_p95_seconds": {
"client": 0.003569880000213743,
"prometheus": 0.004909843739733048,
"ratio": 1.375352599930271
},
"ready_p95_seconds": {
"client_polling_upper_bound": 1.0131328810002742,
"prometheus": 0.9458333333333333,
"ratio": 0.9335728324200716
},
"worker_p95_seconds": 0.0975
}
Exported HTTP buckets begin at 5 ms, worker buckets at 50 ms and ready buckets at 100 ms. The client/Prometheus values have the same order of magnitude and use seconds consistently.
Lifecycle cleanup
make cleanup-lab completed successfully after the grade-5 regression. A Docker inventory confirmed no lab1–lab6 containers, locally built images or Compose networks remain. Lab5 and lab6 named volumes were intentionally preserved; no pulled third-party image or unrelated Docker resource was selected for removal.