Skip to content

ROX-33626: Add Prometheus metrics to alert manager#19459

Merged
dashrews78 merged 2 commits intomasterfrom
dashrews/merge-alert-metrics-33626
Mar 18, 2026
Merged

ROX-33626: Add Prometheus metrics to alert manager#19459
dashrews78 merged 2 commits intomasterfrom
dashrews/merge-alert-metrics-33626

Conversation

@dashrews78
Copy link
Contributor

@dashrews78 dashrews78 commented Mar 17, 2026

Description

Add instrumentation to AlertAndNotify and mergeManyAlerts to collect
production data on alert processing performance before optimizing.

Metrics added:

  • alert_and_notify_duration_ms: end-to-end duration histogram
  • alert_and_notify_incoming_count: incoming alerts per call
  • merge_many_alerts_duration_ms: merge duration histogram
  • merge_many_alerts_previous_count: previous alerts fetched from DB
  • alert_outcome_total: counter vec by outcome (new/updated/resolved)

Partially generated by AI.

Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com

User-facing documentation

Testing and quality

  • the change is production ready: the change is GA, or otherwise the functionality is gated by a feature flag
  • CI results are inspected

Automated testing

  • added unit tests
  • added e2e tests
  • added regression tests
  • added compatibility tests
  • modified existing tests

How I validated my change

Spun up openshift cluster with the PR and checked the metrics in a diagnostic bundle.

Add instrumentation to AlertAndNotify and mergeManyAlerts to collect
production data on alert processing performance before optimizing.

Metrics added:
- alert_and_notify_duration_ms: end-to-end duration histogram
- alert_and_notify_incoming_count: incoming alerts per call
- merge_many_alerts_duration_ms: merge duration histogram
- merge_many_alerts_previous_count: previous alerts fetched from DB
- alert_outcome_total: counter vec by outcome (new/updated/resolved)

Partially generated by AI.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@dashrews78
Copy link
Contributor Author

dashrews78 commented Mar 17, 2026

This change is part of the following stack:

Change managed by git-spice.

@rhacs-bot
Copy link
Contributor

rhacs-bot commented Mar 17, 2026

Images are ready for the commit at a634bf6.

To use with deploy scripts, first export MAIN_IMAGE_TAG=4.11.x-348-ga634bf6312.

@codecov
Copy link

codecov bot commented Mar 17, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 49.33%. Comparing base (fe38a34) to head (a634bf6).
⚠️ Report is 23 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #19459      +/-   ##
==========================================
- Coverage   49.34%   49.33%   -0.01%     
==========================================
  Files        2719     2723       +4     
  Lines      205087   205197     +110     
==========================================
+ Hits       101193   101232      +39     
- Misses      96361    96435      +74     
+ Partials     7533     7530       -3     
Flag Coverage Δ
go-unit-tests 49.33% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Address PR feedback: extract observeDurationMs helper for the
defer-based duration pattern, and move outcome counting to a plain
recordAlertOutcomes call at the end of mergeManyAlerts instead of
using closures over named return values.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@dashrews78 dashrews78 merged commit 18630ad into master Mar 18, 2026
148 of 170 checks passed
@dashrews78 dashrews78 deleted the dashrews/merge-alert-metrics-33626 branch March 18, 2026 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants