Skip to content

Commit da19e73

Browse files
committed
Incident: Log ignored superfluous events
1 parent f1cfa75 commit da19e73

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

internal/incident/incident.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,8 +283,8 @@ func (i *Incident) processSeverityChangedEvent(ctx context.Context, tx *sqlx.Tx,
283283
oldSeverity := i.Severity
284284
newSeverity := ev.Severity
285285
if oldSeverity == newSeverity {
286-
err := fmt.Errorf("%w: %s state event from source %d", event.ErrSuperfluousStateChange, ev.Severity.String(), ev.SourceId)
287-
return err
286+
i.logger.Debugw("Ignoring superfluous severity change event", zap.Int64("source_id", ev.SourceId), zap.Stringer("event", ev))
287+
return event.ErrSuperfluousStateChange
288288
}
289289

290290
i.logger.Infof("Incident severity changed from %s to %s", oldSeverity.String(), newSeverity.String())

0 commit comments

Comments
 (0)