-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
chore (anomaly detection): create proxy API endpoint #76934
Conversation
77ae738
to
c39b111
Compare
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.
bunch of non blocking nits
|
||
anomalies = get_historical_anomaly_data_from_seer(alert_rule, project, start, end) | ||
if anomalies is None: | ||
return Response("Unable to get historical anomaly data", status=400) |
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.
nit: maybe lets add a note here to call out None
is only hit when the seer response is bad
but if there are no anomalies, we'll get an empty array?
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.
If there are fewer than seven days of event data, return an empty array. Otherwise, we get an array of labeled "anomalies" (these are potential anomalies that have been evaluated by Seer)
tests/sentry/incidents/endpoints/test_organization_alert_rule_anomalies.py
Outdated
Show resolved
Hide resolved
tests/sentry/incidents/endpoints/test_organization_alert_rule_anomalies.py
Outdated
Show resolved
Hide resolved
tests/sentry/incidents/endpoints/test_organization_alert_rule_anomalies.py
Outdated
Show resolved
Hide resolved
tests/sentry/incidents/endpoints/test_organization_alert_rule_anomalies.py
Outdated
Show resolved
Hide resolved
tests/sentry/incidents/endpoints/test_organization_alert_rule_anomalies.py
Outdated
Show resolved
Hide resolved
Codecov ReportAttention: Patch coverage is ✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## master #76934 +/- ##
==========================================
- Coverage 78.22% 78.22% -0.01%
==========================================
Files 6898 6900 +2
Lines 306690 306747 +57
Branches 50276 50283 +7
==========================================
+ Hits 239913 239955 +42
- Misses 60415 60429 +14
- Partials 6362 6363 +1 |
1a352bb
to
6eba640
Compare
Create a proxy API endpoint for us to query the backend about anomalies.
get_historical_anomaly_data_from_seer
returns a placeholder.