Skip to content

chore(monitoring): hold the sync-intake alert until it has a bounded signal - #21390

Merged
Git-on-my-level merged 1 commit into
mainfrom
lane/obs-sync-intake-hold
Oct 13, 2026
Merged

Git-on-my-level merged 1 commit into
mainfrom
lane/obs-sync-intake-hold

Conversation

@Git-on-my-level

@Git-on-my-level Git-on-my-level commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

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_intake log lines: about 500 creates and more than 5,000 merges per window. Every evaluation hit error getting page: context deadline exceeded, logged Tick dropped because alert rule evaluation is too slow, and failed with result-set errors, while monitor.omi.me was 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), or omi_sync_intake_total once 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*.py pass through backend/test.sh.

Product invariants affected

none

🤖 Generated with Claude Code

View guided diff Turn on auto-fix

…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]>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-13T11:32:28.359030Z 7804ec2 PR opened
ℹ️ 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" or "@codex security review".

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
Git-on-my-level merged commit fdce4e4 into main Oct 13, 2026
62 checks passed
@Git-on-my-level
Git-on-my-level deleted the lane/obs-sync-intake-hold branch October 13, 2026 11:41
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant