← Back to Pull requests

CNV-87536: Expose dropped-alert and cleanup metrics #1440

Open
unknown opened this pull request with 288 lines diff across 3 files
View on GitHub
unknown unknown commented on Nov 15, 2026 18:05 UTC
Author

Expose ARC-rejected platform instances through
alerts_dropped_active_at_timestamp_seconds, including firing instances no
longer 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 /metrics endpoint and
alerts_effective_active_at_timestamp_seconds). This branch currently
includes 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 main
to 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>

Diff: 288 lines (+216 / -72) across 3 files Reviewer: sradco Review duration: 23027m
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
0.40
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
0.02
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
46%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
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
Reviewers
Assignees
Unassigned
Labels
risk: low confidence: 46.7% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 39.8% (MEDIUM) · Higher = larger blast radius
39.8%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 46.7% · Lower = rushed or shallow review
46.7%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 21.2% · Safe to merge
21.2%