-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
ref(aci): Don't rely on an AlertRule existing in single processing contexts #101116
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
Merged
+47
−24
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Detector config can also have:
sensitivity: str | None
seasonality: str | None
threshold_period: int
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, interesting. I based this on
sentry/src/sentry/incidents/grouptype.py
Lines 340 to 355 in a7a5e2d
Interesting, the current db data doesn't seem to have any with
seasonality
, has only 4 (~0.04%) withsensitivity
, and it looks likethreshold_period
isn't required: https://redash.getsentry.net/queries/9648I'm not sure what that says about the group type schema or this here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me look into this -
seasonality
andsensitivity
are only used for anomaly detection alerts.seasonality
I was wrong about. We have this in the alert rule model but as we never released anything besides "auto" we decided to not migrate it and not let users change this option.sensitivity
we should have on more than 4 detectors though. I'll follow up separately, we might need to run a migration to heal these missing values.threshold_period
isn't required because it's for an unreleased feature that lets you say the alert has to exceed the threshold x number of times before triggering. We have a handful of rules in the Sentry organization that use it, but you can't create a rule like this today. We should probably get rid of these if we don't plan to ever release it, but for now that's what that is.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update: Michelle let me know we moved
sensitivity
off of the Detector model, I was unaware. These are on theDataCondition
now :phew: