Repository navigation
chore(monitoring): hold the sync-intake alert until it has a bounded signal - #21390
Merged
Merged
Conversation
…signal Each evaluation paged 30m of raw Cloud Logging lines, timed out, dropped ticks and added load while Grafana was returning 502s. Paused live on 2026-10-13; this records the pause and the re-admission condition. 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. |
Git-on-my-level
added a commit
that referenced
this pull request
Oct 14, 2026
…g-node CPU (#21455) * fix(monitoring): hold raw-line Loki alert rules and reserve monitoring-node CPU 2026-10-14 prod: Grafana /api/health flapped 502, alert evaluation logged 190 failures + 120 dropped ticks over 20 minutes, the prometheus operator restarted 48x and the adapter 35x in 31h, and every pusher deploy failed on alert provisioning. Two causes, both read-verified against prod: 1. Four committed alert rules query the Loki datasource for raw log lines (whole-namespace regex scans, 60s ticks, one with [$__auto]). They caused 340 of 410 rule-eval failures in 3h (196 from afd0krbk1bugwf alone), each timing out past the 30s datasource budget - the same failure class as the 2026-10-13 Cloud Logging rule (#21390). Pause all four and hold them in metric-inventory admission_holds; re-admit only on bounded counters. 2. Grafana, the operator and the adapter ran BestEffort on a ~1.93 allocatable-core monitoring node while Prometheus's 2-CPU limit exceeded total node capacity, so Prometheus bursts starved kubelet probes (the operator/adapter restart mechanism - SIGTERM after probe timeout) and Grafana's HTTP server. Cap Prometheus at 1600m and give Grafana, the operator and the adapter explicit requests. New contract test rejects any unpaused rule referencing a log datasource (type or prod Loki UID); README documents the policy. The 2-vCPU monitoring node pool remains undersized for 592k head series - resizing it is the follow-up (owner: infra). * fix(monitoring): Loki read-path requests, metric shadow for paused corrupted-stream rule Review revision of #21455 round 1: - Prometheus CPU limit back to "2": load is sustained 1.5-2.2 cores over 14h (the ~2.9-core spikes were kubelet scrape-timeout artifacts), 0% CFS-throttled, and the Prometheus-backed rules already time out - the 1600m cap would throttle them and the adapter's HPA metrics further. Starvation is fixed with requests plus the pool resize runbook instead. - Loki read path (ingester/querier 50m/256Mi, index-gateway/ruler 20m/128Mi) gets requests, arithmetic in the values file: jzv7 1913m of 1930m allocatable, mczx 1488m. loki values normalized CRLF->LF (file untouched since #2708; the hygiene check rejects new CRLF lines). - README: rollback now records the pre-apply helm revision (rolling back to rev 14 would revert #21306/#21389/#21358/#21409; #21389 is screenshots-off, the 10-13 502 fix); corrected the "renders with no diff" claim; added the 4-vCPU pool resize runbook (exact gcloud create + cordon/drain, zonal us-central1-a so the Grafana/Prometheus PVCs reattach); stack applies marked off-peak (Prometheus WAL replay of ~700k-980k head series freezes the pusher/listen/parakeet/VAD/diarizer HPAs; #21448's inert diarizer scrape job rides along); the 109/286 down-target count (34 stale kubelet endpoints) noted as operator crash-loop fallout expected to clear. - New metric rule omi-listen-audio-decode-failures shadows the paused corrupted-stream log rule on omi_listen_audio_decode_failures_total (startup zero-init children added); listen-429, ASGI-handshake and direct-OpenAI-quota gaps tracked in #21461.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Re-hold
omi-sync-intake-fragmented, admitted in #21386, by setting it back to paused with an admission hold that records why.On 2026-10-13 between 11:05Z and 11:20Z, each evaluation of this Cloud Logging datasource rule paged 30 minutes of raw
omi_sync_intakelog lines: about 500 creates and more than 5,000 merges per window. Every evaluation hiterror getting page: context deadline exceeded, loggedTick dropped because alert rule evaluation is too slow, and failed with result-set errors, whilemonitor.omi.mewas flapping 502. After the rule was paused live at about 11:22Z, external health recovered from 4/18 OK to 10/12 OK. The rule is already paused live; this PR makes the repo match.Re-admission condition: a bounded signal. Either a log-based counter metric (Cloud Monitoring
timeSeriesList, like the daily-recap rule), oromi_sync_intake_totalonce backend-sync exports through the GMP sidecar. The replay already showed the condition is quiet (created/(created+merged) ≤ 0.50 against 0.80 across 40 windows), so the signal is worth keeping. Only its query shape was wrong.Verification
Offline lint passes. All
tests/unit/test_monitoring*.pypass throughbackend/test.sh.Product invariants affected
none
🤖 Generated with Claude Code