Repository navigation
monitoring: page demand-gate-unavailable on ratio over live sessions - #22459
Git-on-my-level merged 1 commit into
Conversation
The absolute >=50/5m count flapped on a chronic presence-gate level (p50 ~24% of live sessions). Fire at >60% for 15m with >=100 sessions. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a661b44288
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "uid": "prometheus" | ||
| }, | ||
| "expr": "sum by (to_mode) (increase(omi_fallback_total{job=\"backend-listen-metrics\",component=~\"stt_selection|stt_live_session\",to_mode=\"vendor\",reason=\"gate_unavailable\",outcome=\"degraded\"}[5m]))", | ||
| "expr": "(sum(increase(omi_fallback_total{job=\"backend-listen-metrics\",component=~\"stt_selection|stt_live_session\",to_mode=\"vendor\",reason=\"gate_unavailable\",outcome=\"degraded\"}[15m])) / clamp_min(sum(increase(omi_live_session_transcript_outcome_total{job=\"backend-listen-metrics\"}[15m])), 1)) and on () (sum(increase(omi_live_session_transcript_outcome_total{job=\"backend-listen-metrics\"}[15m])) >= 100)", |
There was a problem hiding this comment.
Match numerator and denominator session populations
When the presence store is unavailable and custom-STT sockets are active, this ratio counts different populations: _initialize_stt() attaches and publishes live demand before the custom-STT early return (backend/routers/listen/receiver.py:1277-1284), and that publish emits the selected gate_unavailable fallback, while _record_session_transcript_outcome() deliberately skips custom-STT sockets (backend/routers/listen/runtime.py:431-432). In a window with at least 100 ordinary outcome samples, sustained custom traffic can therefore push the ratio over 0.60 without adding any denominator samples, so a fixed outage can start paging solely because the traffic mix changed; filter/tag the numerator or normalize by a counter covering the same sockets.
Useful? React with 👍 / 👎.
| "uid": "prometheus" | ||
| }, | ||
| "expr": "sum by (to_mode) (increase(omi_fallback_total{job=\"backend-listen-metrics\",component=~\"stt_selection|stt_live_session\",to_mode=\"vendor\",reason=\"gate_unavailable\",outcome=\"degraded\"}[5m]))", | ||
| "expr": "(sum(increase(omi_fallback_total{job=\"backend-listen-metrics\",component=~\"stt_selection|stt_live_session\",to_mode=\"vendor\",reason=\"gate_unavailable\",outcome=\"degraded\"}[15m])) / clamp_min(sum(increase(omi_live_session_transcript_outcome_total{job=\"backend-listen-metrics\"}[15m])), 1)) and on () (sum(increase(omi_live_session_transcript_outcome_total{job=\"backend-listen-metrics\"}[15m])) >= 100)", |
There was a problem hiding this comment.
Show the normalized signal in the linked panel
When this alert fires and an operator follows its dashboard link, panel 2 still plots only sum by (component, outcome) (rate(omi_fallback_total[5m])) (backend/charts/monitoring/dashboards/omi-services/resilience-fallbacks.json:131), with neither the new 15-minute session denominator/volume floor nor the reason and to_mode filters. Because monitoring notifications rely on the linked panel rather than screenshots, the panel cannot show whether the 0.60 condition actually fired or distinguish this gate signal from other degraded fallbacks; add the exact ratio to that panel or link a matching panel.
Useful? React with 👍 / 👎.
… fallback, last-known on single miss (#22465) - Non-admitted sessions refresh their sibling-visible presence entry every 10s (lease 30s) instead of every second. Entries are kept, not dropped: an ineligible socket's unknown/visible entry still forces the vendor for a sibling admitted socket of the same user. - record_fallback takes demand_cohort; omi_listen_demand_failure_detail_total gains reason=gate_unavailable. The shared omi_fallback_total schema is unchanged. Gate-unavailable alert pages on the admitted cohort ratio plus a label-independent all-sessions guard (builds on #22459). - Admitted sessions bridge exactly one missed heartbeat with the last good answer within the 30s lease; admission into Parakeet never uses it. update_presence logs a bounded error_class, never the message. Co-authored-by: Claude Sonnet 5.5 <[email protected]>
Switch "Live STT - demand gate unavailable" (
omi-stt-gate-unavailable) from an absolute event count to a ratio over live sessions with a volume floor, so it pages on escalation instead of flapping on the chronic level.Why
The rule from #22134 fired on ≥50
gate_unavailableevents per 5m. That count is chronic: 0–101 per 5m all night on 2026-10-18/19, so the alert flapped (Alerting 08:44Z). Measured read-only on 2026-10-19:from_mode=demand_presence(presence storeupdate_presence()reporting unavailable inLiveDemandRouting.publish()); the consumer path contributes 0.omi_live_session_transcript_outcome_total): ~462, of which 446ineligible, 18eligible_control, 0admitted.gate_unavailable / live sessionsat 15m windows over 24h (97 points): p10 9.6%, p50 23.9%, p90 50.5%, max 76.6%.Change
gate_unavailable events (15m) / clamp_min(live sessions (15m), 1), AND live sessions ≥ 100 per 15m.> 0.60,for: 15m, range 15m. Severity, routing and noData unchanged.demand_cohort(owner: two-lane root-cause work).for.Decided with the two-lane/Nemotron lead (option a); the cohort-scoped version (c) follows their label change.
Product invariants affected
none
UI-Evidence: none -- alert rule change only.
How verified
pytestmonitoring contract/provisioning/GMP/backtest/notification/telemetry suites: 187 passed (Google credentials stripped).provision_monitoring_alerts.py --lint: 141 definitions validated.alert_backtest.py --lint: 0 failures.Rollback
Revert this commit and re-run Grafana prod provisioning.
🤖 Generated with Claude Code