monitoring: implement owner routing for alerts#12491
Conversation
|
I would use |
Codecov Report
@@ Coverage Diff @@
## master #12491 +/- ##
==========================================
- Coverage 50.58% 50.58% -0.01%
==========================================
Files 1417 1417
Lines 79285 79283 -2
Branches 6552 6634 +82
==========================================
- Hits 40110 40108 -2
+ Misses 35726 35725 -1
- Partials 3449 3450 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
|
🚀
Unfortunately the only really relevant thing to test here is how alertmanager actually behaves when sending out alerts, but I'll add something to check on the rendered routes |
Exactly, we should not test Alertmanager itself or that it routes properly, only that we render the expected config given X input. |
Codecov Report
@@ Coverage Diff @@
## master #12491 +/- ##
=======================================
Coverage 50.40% 50.40%
=======================================
Files 1425 1425
Lines 79996 79996
Branches 6553 6553
=======================================
Hits 40318 40318
Misses 36211 36211
Partials 3467 3467
Flags with carried forward coverage won't be shown. Click here to find out more. |
| MatchRE: amconfig.MatchRegexps{ | ||
| "owner": *ownerRegexp, | ||
| }, | ||
| Continue: true, // match siblings, so that general-case level receivers still get the alert |
There was a problem hiding this comment.
What does this comment mean? I'm not sure I follow - could you detail it more?
Co-authored-by: Stephen Gutekanst <stephen.gutekanst@gmail.com>
…toring/alert-routing
Adds a new
ownersfield toobservability.alertsas proposed in #12010 for RFC-189. Only alerts that match the specified owners will be received by the associated notifier. Notifiers configured without theownersfield will continue to receive all alerts of the specified level, even with notifiers that haveownerspresent.(outdated screenshot, but close enough)
Closes #12010 - the other half of the proposal was implemented in https://github.com/sourcegraph/sourcegraph/pull/12358
Still thinking about
ownersvsonOwners🤔