Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Alert once per environment per issue #21612

Open
cpressland opened this issue Oct 27, 2020 · 6 comments
Open

Feature Request: Alert once per environment per issue #21612

cpressland opened this issue Oct 27, 2020 · 6 comments

Comments

@cpressland
Copy link

Summary

An additional option to send alerts based on first time an issue is seen in a given environment instead of just the first time the issue is seen.

Motivation

We use Microsoft Teams for alerting, we currently have the following setup in Sentry Alerts:

  • "env: prod" > "The event occurs" > "Send to Teams Channel: 'Alerts - Production'"
  • "env: staging" > "The event occurs" > "Send to Teams Channel: 'Alerts - Staging'"
  • "env: dev" > "The event occurs" > "Send to Teams Channel: 'Alerts - Dev'"

We'd like to instead only fire alerts the first time an issue is seen within a specific environment, however, the following workflow doesn't work:

  • "env: prod" > "The issue is first seen" > "Send to Teams Channel: 'Alerts - Production'"
  • "env: staging" > "The issue is first seen" > "Send to Teams Channel: 'Alerts - Staging'"
  • "env: dev" > "The issue is first seen" > "Send to Teams Channel: 'Alerts - Dev'"

With this setup we only ever see a single alert regardless of environment. If an issue first occurs in Staging, we'll never see a second alert and third alert in the Dev or Production channels. Instead, the alerting rules should give us the flexibility to alert once per env per issue.

@adhiraj
Copy link
Contributor

adhiraj commented Oct 29, 2020

Agreed this would be useful. In the meantime here's an approximate workaround:

  • Select the environment
  • In the "WHEN" clause don't select anything (which tells sentry to alert when a new event is seen)
  • For rate limit select 30 days so that you get alerted only once every 30 days for an issue
  • In the "IF" clause select "newer than 30 days" so that combined with the rate limit, you only get alerted once

The edge case here is that if an issue is first seen in an environment more than 30 days after it was created, it won't alert.

@cpressland
Copy link
Author

@adhiraj not sure I follow? We don't have an "IF" clause, unless I'm misunderstanding you?
Screenshot 2020-10-29 at 11 26 22

@adhiraj
Copy link
Contributor

adhiraj commented Nov 7, 2020

@cpressland are you running self-hosted sentry? This is currently on the cloud version, but we'll be releasing it to self-hosted in a few weeks.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 6, 2021

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Accepted, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

@github-actions github-actions bot locked and limited conversation to collaborators Jan 28, 2021
@gauthamcs gauthamcs assigned rachrwang and unassigned adhiraj and rachrwang Nov 6, 2023
@ndmanvar ndmanvar reopened this Nov 6, 2023
@rachrwang
Copy link

Related issue: #64354

@rachrwang rachrwang added this to the FY'25 Q1 Alerts Small Fixes milestone Feb 6, 2024
@rachrwang
Copy link

rachrwang commented Feb 6, 2024

Proposed solution: we add a new IF condition for the "every event trigger" that says: "First time seen in {environment}", where {environment} is a dropdown

@rachrwang rachrwang removed their assignment Feb 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants