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:
@@ -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
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user