Repository navigation
monitoring: alert siblings for local delivery deaths and sync provider budget - #23271
Conversation
…r budget P34 (#23074) moved Soniox/Modulate local delivery deaths off capacity_full, so omi-stt-capacity-full-exhausted no longer sees them. Add omi-stt-local-delivery-exhausted (warning, >3% of accepted sessions exhausted on send_queue_full|replay_send_stalled|delivery_expired, >=100 accepted/15m, for 30m). Backtest: fires through the pre-#23147 pacing bug (p50 0.039, max 0.060), silent after #23147 (max 0.012). Modulate's 429 "Insufficient credits" (10-22 from ~02:00Z) paged nothing purpose-built. #23234 types it provider_budget_exhausted on sync jobs; add omi-sync-provider-budget-exhausted (critical, >=3 jobs/15m on backend-sync or backfill via gmp-cloud-run, for 5m). 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: e01cc30341
ℹ️ 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".
| "type": "prometheus", | ||
| "uid": "gmp-cloud-run" | ||
| }, | ||
| "expr": "sum by (namespace) (increase(omi_sync_transcription_job_total{project_id=\"based-hardware\",cluster=\"__run__\",job=\"omi-cloud-run-application-metrics\",namespace=~\"backend-sync|backend-sync-backfill\",outcome=\"provider_budget_exhausted\"}[15m]))", |
There was a problem hiding this comment.
Initialize the budget counter before querying increase
When an instance has not previously emitted this outcome—which is true for a newly deployed revision and for the first budget failure—the labeled counter series is created with the failures already included in its first sample, so PromQL increase() cannot observe them without an earlier zero sample. The repository explicitly classifies omi_sync_transcription_job_total as sparse (test_monitoring_stt_metric_zero_init.py:28-30), while this new alert only requires three events; a short burst of three or more failures before the first scrape can therefore leave $A empty/zero and never page. Initialize the relevant bounded provider_budget_exhausted children at startup, as the live fallback counters do, or use a signal with a guaranteed baseline.
Useful? React with 👍 / 👎.
Why
reason="capacity_full".omi-stt-capacity-full-exhaustedtherefore no longer sees sessions exhausted by our own send path.provider_budget_exhaustedonomi_sync_transcription_job_total.What
omi-stt-local-delivery-exhausted(Live STT)omi_fallback_total{component="stt_live_session",reason=~"send_queue_full|replay_send_stalled|delivery_expired",outcome="exhausted"}/ listen-accepted > 0.03, with >= 100 accepted per 15momi-sync-provider-budget-exhausted(Backend-sync, gmp-cloud-run)sum by (namespace) increase(omi_sync_transcription_job_total{outcome="provider_budget_exhausted"}[15m]) >= 3on backend-sync and backfillalert-rules.jsonand the split exports (alerts/live-stt.json,alerts/backend-sync.json).live-alert-gate.json,verify_pusher_live_alert_route.py);Verification
Backtest of the local-delivery rule (prod Prometheus, 15m steps):
Thresholds were set off-peak; I'll revisit after the 10-22 14–16Z peak read.
Budget rule: the outcome is new, so there is no history. It stays silent until fix(stt): classify Modulate out-of-credits (429 "Insufficient credits", 402) as provider_budget_exhausted #23234 is deployed to Cloud Run.
Tests:
BACKEND_UNIT_TEST_FILE_LISTcovering all 25 monitoring, alert and GMP unit files passes.Review: infra rollout lead before merge.
🤖 Generated with Claude Code