Skip to content

Commit

Permalink
fix(notifier) fix dropped notifications mentric (#955)
Browse files Browse the repository at this point in the history
  • Loading branch information
kissken authored Nov 8, 2023
1 parent ac2b022 commit 2e1545d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion notifier/notifier.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ func (notifier *StandardNotifier) GetReadBatchSize() int64 {

func (notifier *StandardNotifier) resend(pkg *NotificationPackage, reason string) {
if pkg.DontResend {
notifier.metrics.MarkSendersDroppedNotifications(pkg.Contact.Type)
return
}
notifier.metrics.SendingFailed.Mark(1)
Expand Down Expand Up @@ -227,7 +228,6 @@ func (notifier *StandardNotifier) runSender(sender moira.Sender, ch chan Notific
log.Warning().
Error(err).
Msg("Cannot send notification")
notifier.metrics.MarkSendersDroppedNotifications(pkg.Contact.Type)
}

notifier.resend(&pkg, err.Error())
Expand Down

0 comments on commit 2e1545d

Please sign in to comment.