getsentry / getsentry/self-hosted
never receive alerts configured for "Number of events in an issue is more than x in y"
- Dominant language
- Shell
- Stars
- 9.6k
- Forks
- 2k
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 12
Description
Peeling off this comment from @maxkerp in https://github.com/getsentry/sentry/issues/116677
> We are experiencing a very similar behavior on our self-hosted setup, specifically regarding alert rules failing to execute actions after the initial issue creation.
>
> ### Our Environment
>
> * **Type:** Self-hosted Sentry (managed by a professional third-party hosting service).
> * **Integration:** Custom integration handling alert webhooks to route notifications into Mattermost.
> * **Versions:** This setup worked perfectly until our upgrade to **v26.4.2** (the April update). Upgrading further to **v26.6.6** did not resolve the issue.
>
> ### Observed Facts
>
> #### What works
>
> * "Send Test Notification" always worked and never broke.
> * `installation` webhook events are also reliably delivered.
> * Alerts configured for *"A new issue is created"* trigger and deliver successfully on the first event.
>
>
> #### What is broken
>
> * We never receive alerts configured for *"Number of events in an issue is more than x in y"*.
>
> After the first event creates the issue, no subsequent volume or frequency thresholds trigger an alert for that issue again.
>
> ### UI & Metadata Observations
>
>
> * **"Time Last Triggered":** The alert rule is never shown to be triggered beyond the initial creation event. The "time last triggered" field in the Sentry UI only ever reflects the timestamp of that very first event.
> * **Preview Panel:** Despite the alert never firing, the preview panel within the alert configuration page **does correctly display the newer events** that meet the criteria and should be triggering the alert.
>
> The fact that the docs for webhooks are out of date made this harder to debug than necessary [#18370](https://github.com/getsentry/sentry-docs/issues/18370)
> Since the preview and the triggering logic is diverging maybe related to #118216
>
> p.s. I had ai help me write this comment. But I'm a real person. Please reach out if you need more information/context. Thanks for your work! ❤️
_Originally posted by @maxkerp in [#116677](https://github.com/getsentry/sentry/issues/116677#issuecomment-4778144727)_
Contributor guide
Research direction
No source files, tests, or entry points are named. Start by reproducing the failure with a self-hosted setup using the “Number of events in an issue is more than x in y” rule, then compare its behavior with the working new-issue alert and preview panel. Done means subsequent threshold events trigger and deliver the configured webhook alert, with the last-triggered time updating accordingly.
Written by the indexing model from the issue text.
Assessment
- Domain
- observability-sre
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 38/100