fix: correct frontend SLO alerts with request-weighted signals #6965
All Vouch review confidence checks passed
Residual risk 0.21 = Change Risk (0.52) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.52 · 642 lines diff across 8 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.387
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #6965"
general
weight: 0.35
shubhadapaithankar
ARO-29638
What
Reintroduces the Frontend (ARM RP) SLO alerts reverted in #6958, with the recording and alerting model corrected so every HTTP SLI (latency, errors, availability) is a request-weighted ratio computed directly over each MWMBR window instead of an average of a recorded 5-minute value.
Latency:
avg_over_timeof recorded 5-minute p99 values with the request-weighted share of requests slower than 1s, computed directly over each MWMBR window from the raw histogram buckets.- 1h/5m fast burn: more than 14.4% of requests over 1s
- 6h/30m medium burn: more than 6% of requests over 1s
- 3d/6h slow burn: more than 1% of requests over 1s
maxindependently per bucket can combine different replicas and break histogram monotonicity.Errors and availability:
avg_over_timeof the recorded 5-minute 5xx/non-5xx ratio with the 5xx (and non-5xx) request share computed directly from rawfrontend_http_requests_totalover each MWMBR window.Shared:
offset 5mto all window queries so rule evaluation avoids the unsettled ingestion edge.Why
The stored Frontend p99 recording diverges from the underlying data. In West US 3 INT, the stored recording reached 13.265s while recomputing the raw histogram at the same timestamp produced 44.6ms. The stored 30m and 6h averages were 1.766s, while the settled raw-window p99 was 144ms and no requests exceeded 1s.
There are two independent problems, and the second applies to all three HTTP SLIs:
1. The recording rule uses
max without(prometheus_replica)independently for each histogram bucket. This repeats the failure mode fixed in AROSLSRE-1746, where mixed replicas broke cumulative bucket monotonicity and reported 12.083s p99 for traffic whose actual maximum was 26ms.2. Averaging 5-minute values is neither an aggregate percentile nor a burn rate. It weights a quiet 5-minute window the same as a busy one. For latency, a regression test with one slow request followed by 1,000 fast requests produces an averaged p99 of 7.924s, although the aggregate p99 is 0.982s and only 0.0999% of requests exceed 1s. The same equal-weighting affects the errors and availability alerts: a brief low-traffic burst of 5xx can dominate an otherwise busy hour and trip the Sev 3 fast alert even though its share of the hour's requests is negligible.
The new expressions measure the request fraction that consumes each SLO's error budget and calculate it directly over each alert window.
Testing
tooling/prometheus-rulesgeneration and its embeddedpromtooltests for the RP service alerts and service recording rules.- healthy traffic and duplicate HA replicas
- latency 14.4%, 6%, and 1% burn behavior, below-threshold traffic, five-minute delayed histogram-bucket ingestion, and request-volume skew that previously made averaged p99 misleading
- errors and availability fast, medium, and slow burn behavior driven by raw request counters
- a low-volume scenario proving the request-weighted 1h 5xx share stays below the fast floor while the reverted averaged-ratio design crosses it
- corrected p99/p95 diagnostic recordings
yamlfmt v0.16.0 -linton all changed YAML files.git diff --check.Special notes for your reviewer
@geoberle: this addresses the stored-versus-recomputed p99 divergence and removes 5-minute averaging from the latency, errors, and availability alert models.
@shubhadapaithankar: this preserves the intended 1h/5m, 6h/30m, and 3d/6h MWMBR structure while expressing each SLI as error-budget consumption. The errors and availability equal-weighting we discussed is fixed here; absolute-volume floors remain a possible follow-up if production shows residual low-count sensitivity.
No dashboard or UI is changed, so screenshots are not applicable.
PR Checklist