getsentry / getsentry/sentry

Duplicated emails for escalating issues

Open
#124,455 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Bug Product Area: Settings Waiting for: Product Owner
Dominant language
Python
Stars
44.8k
Forks
4.9k
Avg merge
21h 23m
Merged PRs (30d)
607

Description

Environment

SaaS (https://sentry.io/)

Steps to Reproduce
  1. Have an error monitor for issues.
  2. Configure alert for sending email alerts when a new issue is created, when a resolved issue regresses, and when an issue escalates.
  3. Wait until some issue escalates.
Expected Result

There should be only one alert email. Even if both project-specific alert rule is configured and the user has "Workflow Notifications" enabled, Sentry should notice that and send only the alert rule email. The email subject should contain both the issue ID and the issue title. Potentially, although this is more like a feature reqest, it should also contain the issue status.

This is the case when the issue is created or has regressed. Also, in those two cases, the email from the alert rule clearly says "Regressed issue" or "New issue":

Regressed issue alert New issue alert
Actual Result

The two emails are sent.

The first one has a subject only "Re: ISSUE-ID" and contains "Issue marked as escalating" title.

First email

Another problem with this email is that compared to alert rule emails, this email doesn't specify the issue title in the email subject.

The second email, which often arrives a few minutes later, but sometimes almost at the same time, has a subject "ISSUE-ID - Issue name/description", and contains "New Alert" title.

Second email

A problem with this email is also that it only says "New Alert" and not "Escalated issue", unlike the other two alert email types.

I assume the first email is sent because I have "Workflow Notifications" enabled for subscribed issues in account/personal notifications, and the second one is sent because of the monitor/alert rule.

Product Area

Alerts

Link

No response

DSN

No response

Version

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the escalation with both Workflow Notifications and a project-specific alert rule enabled, then trace the Alerts notification paths responsible for each email. Done means one escalation email is delivered instead of two, with the issue ID and title in its subject and clear escalation wording.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend, observability
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.