[v10.4.x] Notifications: Do not log email address in error message (#89500)

Notifications: Do not log email address in error message (#89314)

Do not log email address in error message

(cherry picked from commit c2c30c25ed)

Co-authored-by: William Wernert <william.wernert@grafana.com>
release-10.4.5
grafana-delivery-bot[bot] 1 year ago committed by GitHub
parent 1491c9adc3
commit fec5b421a9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      pkg/services/notifications/smtp.go

@ -70,7 +70,7 @@ func (sc *SmtpClient) Send(ctx context.Context, messages ...*Message) (int, erro
emailsSentFailed.Inc()
}
err = fmt.Errorf("failed to send notification to email addresses: %s: %w", strings.Join(msg.To, ";"), innerError)
err = fmt.Errorf("failed to send email: %w", innerError)
span.RecordError(err)
span.SetStatus(codes.Error, err.Error())

Loading…
Cancel
Save