Skip to content

Commit 548b031

Browse files
alerts(prom): CHAOS F3 — page on propagation_dead_lettered_total > 0 for 5m
Adds two Prometheus alerts to the instant-platform PrometheusRule for the new worker counters introduced in CHAOS-DRILL-2026-05-20 F2/F3 follow-ups: PropagationDeadLettered (severity=critical): fires when sum(rate(instant_propagation_dead_lettered_total[5m])) > 0 for 5m. Means propagation_runner exhausted propagationMaxAttempts of backoff retries on at least one pending_propagations row — a paying customer's regrade fell through and they are 'Pro on paper, hobby-grade infra'. The companion NR log-based alert (newrelic/alerts/propagation-dead-lettered.json) keys on the slog ERROR line; this Prom rule keys on the counter so the alert still fires when NR Log ingest is brown-outed but Prometheus is still scraping. PropagationUnknownKind (severity=warning): fires on instant_propagation_unknown_kind_total — the per-tick image-skew leading indicator. Worker pod is older than the api enqueue surface. Lower-severity by design: the fix is to finish the rollout, NOT to wake on-call. Pairs with the worker repo's chaos-f234-on-f1 branch, which adds the RescueStuckJobsAfter pin (F4) + the dead-letter Prom counter (F3) + the registry-iterating tests. Per CLAUDE.md rule 15: infra has no auto-apply — Manas applies this manually via kubectl apply -f k8s/prometheus-rules.yaml. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent b95ee3f commit 548b031

1 file changed

Lines changed: 45 additions & 0 deletions

File tree

k8s/prometheus-rules.yaml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,3 +173,48 @@ spec:
173173
annotations:
174174
summary: "Backup Job {{ $labels.cronjob }} most recent run is in Failed state"
175175
description: "kube_job_status_failed > 0 for backup Job in instant-data. Pull pod logs and re-run manually if needed: see infra/BACKUP-RESTORE-RUNBOOK.md."
176+
177+
# instant-worker — propagation_runner dead-letter alerts (CHAOS F3, 2026-05-20).
178+
# Fires on the worker's instant_propagation_dead_lettered_total counter
179+
# (introduced in worker repo, see metrics.go::PropagationDeadLetteredTotal).
180+
# Three triggers feed this metric — labelled by `reason`:
181+
# reason="max_attempts" — propagationMaxAttempts (10) of exponential
182+
# backoff retries exhausted (the modal real-failure
183+
# path: provisioner gRPC down, F1's
184+
# unexpected_skip-as-failure, markApplied DB blip).
185+
# reason="unknown_kind" — CHAOS F2: old worker image saw a kind the api
186+
# started enqueuing in a newer release.
187+
# Both mean a paying customer's regrade fell through. The companion NR
188+
# log-based alert (newrelic/alerts/propagation-dead-lettered.json) keys on
189+
# the slog ERROR line; this Prom rule keys on the counter for the case
190+
# where NR Log ingest is brown-outed but Prometheus is still scraping.
191+
- name: instant-worker
192+
rules:
193+
- alert: PropagationDeadLettered
194+
expr: |
195+
sum(rate(instant_propagation_dead_lettered_total[5m])) > 0
196+
for: 5m
197+
labels:
198+
severity: critical
199+
service: worker
200+
annotations:
201+
summary: "instant-worker propagation_runner dead-lettered a row in the last 5m (Pro-on-paper, hobby-grade infra)"
202+
description: "instant_propagation_dead_lettered_total > 0 for >5m. propagation_runner is the last line of defence between Razorpay webhook delivery and customer infra; any dead-letter means a paying customer's regrade fell through. Inspect pending_propagations.last_error + the team's resources, fix the underlying issue, then either DELETE the row to let entitlement_reconciler converge OR reset failed_at=NULL+attempts=0 to re-arm the runner. See CHAOS-DRILL-2026-05-20.md F1/F2/F3."
203+
204+
# Per-tick image-skew leading indicator: PropagationUnknownKindTotal
205+
# fires on EVERY tick while an unknown-kind row is alive (not just
206+
# at the eventual dead-letter, which is ~24h away on the default
207+
# backoff). Lets the operator catch a half-rolled-out worker pod
208+
# within seconds rather than waiting the full backoff exhaustion.
209+
# Lower-severity than PropagationDeadLettered — the fix here is to
210+
# finish the rollout, NOT to wake on-call.
211+
- alert: PropagationUnknownKind
212+
expr: |
213+
sum by (kind) (rate(instant_propagation_unknown_kind_total[5m])) > 0
214+
for: 5m
215+
labels:
216+
severity: warning
217+
service: worker
218+
annotations:
219+
summary: "instant-worker saw a pending_propagations kind it doesn't recognise (kind={{ $labels.kind }})"
220+
description: "instant_propagation_unknown_kind_total{kind=\"{{ $labels.kind }}\"} > 0 for >5m. A worker pod is running an older image than the api enqueued (kind={{ $labels.kind }} is not in propagationHandlers). Finish the rollout — `kubectl rollout status deploy/instant-worker -n instant-infra` and confirm pods are on the same image as instant-api. The row will dead-letter after propagationMaxAttempts (10) attempts (~24h cumulative backoff) which will fire PropagationDeadLettered above; this is the early warning."

0 commit comments

Comments
 (0)