Include notifier type in retry logs and errors

This commit is contained in:
Julius Volz 2017-04-11 00:50:14 +02:00
parent b7bea3df5c
commit 7f1d111324
1 changed files with 2 additions and 2 deletions

View File

@ -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