CNV-87536: Expose dropped-alert and cleanup metrics #1440
All Vouch review confidence checks passed
Residual risk 0.21 = Change Risk (0.40) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.40 · 288 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Shallow Review Depth
shallow_review_depth
0.344
Diff Size
diff_size
0.339
Real PR Conversation Timeline
1 comments
"Review active on #1440"
general
weight: 0.35
sradco
Expose ARC-rejected platform instances through
alerts_dropped_active_at_timestamp_seconds, including firing instances nolonger reaching Alertmanager. Preserve their original pending/firing state,
activation timestamp, and labels applied before rejection. Dropped instances
never enter the effective metric, and the alerts API continues to omit them.
Dropped series require live Prometheus data; Alertmanager alone cannot
establish their original state and activation timestamp.
Expose cleanup operational metrics: list and delete attempts and failures,
and the retained GitOps orphan gauge. Cleanup metrics register independently
of leader-election initialization. Restrict orphan cleanup to the elected
metrics leader so replicas do not double-count cleanup work, and treat
already-deleted configs as success.
Depends on #1330 (authenticated
/metricsendpoint andalerts_effective_active_at_timestamp_seconds). This branch currentlyincludes that PR's commits because GitHub cannot use a fork branch as the
base of an upstream PR. After #1330 merges, rebase this branch onto
mainto show only the dropped-alert and cleanup slice.
Validation: backend unit tests,
go vet(including the e2e build tag),gofmt, and e2e framework tests.
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
<!-- coderabbit-ai-generated:v1 -->
Summary by CodeRabbit
New Features
Added Prometheus metrics for effective alerts and alerts dropped by relabeling, including alert state, labels, and activation timestamps.
Alert metrics are published by a single elected replica. Available snapshots remain visible during temporary source failures, then expire if updates do not resume.
Added metrics for alert configuration cleanup activity and remaining GitOps-managed orphans.
Added optional visibility into alerts dropped by relabeling.
Bug Fixes
Corrected Prometheus API paths and improved alert activation-time matching when delivery labels are relabeled.
Documentation
* Expanded metrics guidance with feature requirements, timestamp matching, cleanup behavior, and end-to-end test procedures.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Signed-off-by: Shirly Radco <sradco@redhat.com>
Co-authored-by: GLM <noreply@z.ai>