NewWork mode: your Claude Code or Codex on work calls, answering from your project's codeSkip to content
Middle1 view

An error occurs in the application logs once an hour. The alert rule checks the logs every 5 minutes. How can we configure the rule so it doesn’t send 12 alerts in an hour for the same log entry?

Practice

AI answer

Notifications should be deduplicated by event instance rather than sent on every poll. Use a stable fingerprint—for example, based on the record ID or a combination of the service, error type, and key fields—and store the state of events that have already been processed with a TTL. In the alerting system, configure group_by to use this key and increase repeat_interval so that a firing alert is not resent every 5 minutes. If each occurrence of an event should be treated as new, include the event ID or timestamp in the fingerprint. Also check the query window and firing/resolved transitions: they should not create new instances for the same record.