Skip to content

feat(observability): BackendT2Degraded alert for silent tier-2 offload degradation#125

Open
EdHasNoLife wants to merge 1 commit into
mainfrom
cac-192-backendt2-alert
Open

feat(observability): BackendT2Degraded alert for silent tier-2 offload degradation#125
EdHasNoLife wants to merge 1 commit into
mainfrom
cac-192-backendt2-alert

Conversation

@EdHasNoLife

Copy link
Copy Markdown
Collaborator

Per-CacheBackend Prometheus alert for silently-degraded tier-2 (external offload). Fires when a backend is actively serving tier-2 queries (rate(inferencecache_backend_t2_query_tokens_total[10m]) > 1000 tokens/sec) yet recalling zero reloads (inferencecache_backend_t2_hit_rate == 0). The query-rate clause is the activity gate — an idle/cold backend has no query growth (rate ≈ 0), so it doesn't page. Per-backend companion to the per-pod LMCacheT2NoHits; the Prometheus view of the advisory T2Degraded condition (broader — also covers External backends, whose condition the controller doesn't manage).

  • BackendT2Degraded in both the flat alerting-rules.yaml and the PrometheusRule CR (drift-gated) — warning, for: 5m
  • promtool tests: fires (+ pending-before-dwell) · not-on-serving · not-on-idle · below-floor · per-install isolation
  • runbook section + enablement note in docs/observability/alerts.md
  • fix the now-stale LMCacheT2NoHits note (the engine-metrics scraper reads vLLM's external_prefix_cache_* now)

make verify-prometheus green (drift-synced, kustomize clean). Consumes inferencecache_backend_t2_hit_rate + inferencecache_backend_t2_query_tokens_total, both already on main.

Note: re-lands the alert onto main#120 merged into the stacked base branch (cac-192-t2-alerting) rather than main, so the alert never reached main. Content matches #120 plus the alert-scope reword + lifetime-cumulative caveat.

@linear-code

linear-code Bot commented Jun 29, 2026

Copy link
Copy Markdown

CAC-192

@github-actions

Copy link
Copy Markdown

Codex review

Files reviewed

  • config/observability
    • [reviewed] alerting-rules.yaml
    • [reviewed] prometheus-rules-tests.yaml
    • [reviewed] prometheus-rules.yaml
  • docs/observability
    • [reviewed] alerts.md

Findings

Blocking

None.

Should-fix

docs/observability/alerts.md:779 — The runbook says the T2Degraded CR condition “mirrors the gauge,” but the new alert explicitly also fires for External backends, whose T2Degraded condition the controller does not manage. Operators following this step for an External backend will get no condition back and may incorrectly conclude the alert is bogus; split this into managed-backend CR-condition verification and PromQL/gauge verification for External.

Nit

docs/observability/alerts.md:732 — The section opens with “A managed CacheBackend’s tier-2...” even though the alert is documented as broader and applicable to External backends too. Use neutral wording like “A CacheBackend’s tier-2...” to avoid contradicting the scope statement later in the paragraph.

Per-category coverage

  1. Vendor-neutral naming: Clean
  2. Contract & spec / docs sync: findings above at: docs/observability/alerts.md:779, docs/observability/alerts.md:732
  3. gRPC fail-open semantics: Clean
  4. Quality (tests / error wrapping / package placement / generated drift): Clean

Verdict

changes-requested

…d degradation

Per-CacheBackend Prometheus alert that fires when a backend is actively serving
tier-2 (external offload) queries yet recalling zero reloads — the silent
degradation the 32B/TP=2 dig surfaced (PYTHONHASHSEED, server OOM, version skew).
Per-CacheBackend companion to the per-pod LMCacheT2NoHits (no scrape-scoping
caveat) and the Prometheus view of the advisory T2Degraded CR condition.

- BackendT2Degraded in both alerting-rules.yaml (flat) and the PrometheusRule
  CR; warning, for: 5m. Activity-gated:
  rate(inferencecache_backend_t2_query_tokens_total[10m]) > 1000 tokens/sec
  AND max by (namespace, backend) (inferencecache_backend_t2_hit_rate) == 0
- promtool tests: fires (+ pending-before-dwell), not-on-serving, not-on-idle,
  below-floor, per-install isolation
- runbook section in docs/observability/alerts.md; enablement docs note the
  controller scrape both controller-side alerts need
- correct the now-stale LMCacheT2NoHits note (the engine-metrics scraper reads
  vLLM's external_prefix_cache_* counters now)

Re-lands the alert onto main; the original PR merged into the stacked base
branch rather than main, so it never reached main.
@EdHasNoLife
EdHasNoLife force-pushed the cac-192-backendt2-alert branch from 71ecf68 to 5bff981 Compare June 29, 2026 02:43
@github-actions

Copy link
Copy Markdown

Codex review

Files reviewed

  • config/observability
    • alerting-rules.yaml [reviewed]
    • prometheus-rules-tests.yaml [reviewed]
    • prometheus-rules.yaml [reviewed]
  • docs/observability
    • alerts.md [reviewed]

Findings

Blocking

None.

Should-fix

None.

Nit

None.

Per-category coverage

  1. Vendor-neutral naming: Clean
  2. Contract & spec / docs sync: Clean
  3. gRPC fail-open semantics: Clean
  4. Quality (tests / error wrapping / package placement / generated drift): Clean

Verdict

approve

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