Skip to content

Commit

Permalink
ref(webhook): return error if unable to parse group key
Browse files Browse the repository at this point in the history
Addresses feedback from another PR
prometheus#4089 (comment)

Signed-off-by: TJ Hoplock <[email protected]>
  • Loading branch information
tjhop committed Nov 6, 2024
1 parent f6b942c commit 38ee8ad
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions notify/webhook/webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,10 @@ func (n *Notifier) Notify(ctx context.Context, alerts ...*types.Alert) (bool, er

groupKey, err := notify.ExtractGroupKey(ctx)
if err != nil {
// @tjhop: should we `return false, err` here as we do in most
// other Notify() implementations?
n.logger.Error("error extracting group key", "err", err)
return false, err
}

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

msg := &Message{
Version: "4",
Expand Down

0 comments on commit 38ee8ad

Please sign in to comment.