Skip to content

Commit

Permalink
Incident: Log ignored superfluous events
Browse files Browse the repository at this point in the history
  • Loading branch information
yhabteab committed Aug 1, 2024
1 parent 899a6d9 commit 7c9c468
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/incident/incident.go
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,8 @@ func (i *Incident) processSeverityChangedEvent(ctx context.Context, tx *sqlx.Tx,
oldSeverity := i.Severity
newSeverity := ev.Severity
if oldSeverity == newSeverity {
err := fmt.Errorf("%w: %s state event from source %d", event.ErrSuperfluousStateChange, ev.Severity.String(), ev.SourceId)
return err
i.Logger.Debugw("Ignoring superfluous severity change event", zap.Int64("source_id", ev.SourceId), zap.Stringer("event", ev))
return event.ErrSuperfluousStateChange
}

i.Logger.Infof("Incident severity changed from %s to %s", oldSeverity.String(), newSeverity.String())
Expand Down

0 comments on commit 7c9c468

Please sign in to comment.