From 7f1d11132473ace30b23b5cb4d04b742c2149654 Mon Sep 17 00:00:00 2001 From: Julius Volz Date: Tue, 11 Apr 2017 00:50:14 +0200 Subject: [PATCH] Include notifier type in retry logs and errors --- notify/notify.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/notify/notify.go b/notify/notify.go index a1c6acd3c5..e7538cffd5 100644 --- a/notify/notify.go +++ b/notify/notify.go @@ -543,9 +543,9 @@ func (r RetryStage) Exec(ctx context.Context, alerts ...*types.Alert) (context.C case <-tick.C: if retry, err := r.integration.Notify(ctx, alerts...); err != nil { numFailedNotifications.WithLabelValues(r.integration.name).Inc() - log.Debugf("Notify attempt %d failed: %s", i, err) + log.Debugf("Notify attempt %d for %q failed: %s", i, r.integration.name, err) if !retry { - return ctx, alerts, fmt.Errorf("Cancelling notify retry due to unrecoverable error: %s", err) + return ctx, alerts, fmt.Errorf("Cancelling notify retry for %q due to unrecoverable error: %s", r.integration.name, err) } // Save this error to be able to return the last seen error by an