← Back to Pull requests

CNV-87536: Expose effective-alert metrics #1330

Open
unknown opened this pull request with 325 lines diff across 4 files
View on GitHub
unknown unknown commented on Oct 06, 2026 14:15 UTC
Author

Expose alerts_effective_active_at_timestamp_seconds for effective firing,
pending, and silenced alerts that survive ARC relabeling. Preserve
post-relabeling and classification labels, deduplicate identical effective series, and enrich active timestamps
using Prometheus delivery labels. Only the elected leader emits alert series.

Each leadership term starts with an empty snapshot, and in-flight fetches from
old terms cannot republish it. Platform and user-workload snapshots expire
independently one refresh interval after fetching starts. User-workload
failures retain only still-fresh user data while platform metrics continue to
refresh. Thanos-only user-workload alerts remain included.

Relabel evaluation and matching use captured upstream labels, including genuine
values under reserved metadata names. Timestamp enrichment uses only firing
instances whose activation is no later than Alertmanager's firing timestamp;
ambiguous occurrences and configuration-only external labels retain
Alertmanager's timestamp. Parsed backend configuration and failures are cached
for 30 seconds, with configuration requests bounded to one second.

Depends on #1406,
which introduces the authenticated /metrics endpoint independently of alert
management. This branch currently includes that foundation commit because
GitHub cannot use a fork branch as the base of an upstream PR. After #1406
merges, rebase this branch onto main to show only the effective-alert slice.

The dropped-alert metric and the relabel-config cleanup metrics moved to
#1440, stacked on
this PR and merging after it.

Documentation links to the OpenShift authentication conventions and covers
plugin-specific integration requirements.

Validation: backend and frontend unit tests; certificate authorization and
rotation; alert label and timestamp handling; leadership/freshness race
checks; partial-source outage and recovery; backend config caching and
cancellation; Service fallback; API filtering; E2E compilation and lint. The
E2E metric parser now uses a UTF-8-validating parser; the zero-value parser
panics under prometheus/common v0.67+. Live cluster E2E validation remains
outstanding.

Known validation gaps: translation extraction reproduces existing catalog
drift on main. The management API E2E CI step currently starts the backend
over HTTP; metrics scrapes require HTTPS and the Prometheus client certificate.

Signed-off-by: Shirly Radco <sradco@redhat.com>
Co-authored-by: GLM <noreply@z.ai>

Diff: 325 lines (+243 / -82) across 4 files Reviewer: PeterYurkovich Review duration: 77222m
All Vouch review confidence checks passed
Residual risk 0.27 = Change Risk (0.49) × (1 − Review Confidence (0.45)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.49 · 325 lines diff across 4 files
0.49
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%
44%
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
Diff Size diff_size
0.346
Shallow Review Depth shallow_review_depth
0.344
Real PR Conversation Timeline
1 comments
"Review active on #1330"
general weight: 0.35
Assignees
Unassigned
Labels
risk: low confidence: 44.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: 49% (MEDIUM) · Higher = larger blast radius
49%
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: 44.7% · Lower = rushed or shallow review
44.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: 27.1% · Safe to merge
27.1%