1
0
mirror of https://github.com/prometheus/alertmanager.git synced 2026-02-05 15:45:34 +01:00

chore: improves logging around webhook dispatch failure (#4511)

Signed-off-by: CameronHall <cameron.hall@target.com>
Co-authored-by: CameronHall <cameron.hall@target.com>
This commit is contained in:
Cameron Hall
2025-11-05 15:04:52 -06:00
committed by GitHub
parent f969a4c8f6
commit 80d0265e16
2 changed files with 2 additions and 2 deletions

View File

@@ -350,7 +350,7 @@ func (d *Dispatcher) processAlert(alert *types.Alert, route *Route) {
go ag.run(func(ctx context.Context, alerts ...*types.Alert) bool {
_, _, err := d.stage.Exec(ctx, d.logger, alerts...)
if err != nil {
logger := d.logger.With("num_alerts", len(alerts), "err", err)
logger := d.logger.With("aggrGroup", ag.GroupKey(), "num_alerts", len(alerts), "err", err)
if errors.Is(ctx.Err(), context.Canceled) {
// It is expected for the context to be canceled on
// configuration reload or shutdown. In this case, the

View File

@@ -87,7 +87,7 @@ func (n *Notifier) Notify(ctx context.Context, alerts ...*types.Alert) (bool, er
n.logger.Error("error extracting group key", "err", err)
}
// @tjhop: should we debug log the key here like most other Notify() implementations?
n.logger.Debug("extracted group key", "key", groupKey.String())
msg := &Message{
Version: "4",