Skip to content

Commit 80d0265

Browse files
CameronJHallCameronHall
andauthored
chore: improves logging around webhook dispatch failure (#4511)
Signed-off-by: CameronHall <[email protected]> Co-authored-by: CameronHall <[email protected]>
1 parent f969a4c commit 80d0265

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

dispatch/dispatch.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ func (d *Dispatcher) processAlert(alert *types.Alert, route *Route) {
350350
go ag.run(func(ctx context.Context, alerts ...*types.Alert) bool {
351351
_, _, err := d.stage.Exec(ctx, d.logger, alerts...)
352352
if err != nil {
353-
logger := d.logger.With("num_alerts", len(alerts), "err", err)
353+
logger := d.logger.With("aggrGroup", ag.GroupKey(), "num_alerts", len(alerts), "err", err)
354354
if errors.Is(ctx.Err(), context.Canceled) {
355355
// It is expected for the context to be canceled on
356356
// configuration reload or shutdown. In this case, the

notify/webhook/webhook.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ func (n *Notifier) Notify(ctx context.Context, alerts ...*types.Alert) (bool, er
8787
n.logger.Error("error extracting group key", "err", err)
8888
}
8989

90-
// @tjhop: should we debug log the key here like most other Notify() implementations?
90+
n.logger.Debug("extracted group key", "key", groupKey.String())
9191

9292
msg := &Message{
9393
Version: "4",

0 commit comments

Comments
 (0)