-
-
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
test(alerts): Debug anomaly detection #77109
Conversation
expected_seasonality=alert_rule.seasonality, | ||
) | ||
############################ | ||
now = datetime.datetime.now() |
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.
Since I don't have access to self.last_update
from the subscription processor, I am using the current timestamp
@@ -103,7 +104,10 @@ def format_historical_data(data: SnubaTSResult, dataset: Any) -> list[TimeSeries | |||
formatted_data.append(ts_point) | |||
else: | |||
for datum in nested_data: | |||
ts_point = TimeSeriesPoint(timestamp=datum.get("time"), value=datum.get("count", 0)) | |||
######################### | |||
count = randrange(1, 100) |
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.
There is no historical data locally so I populate this with random numbers. Seer wasn't happy if I did it all the same number. Put this back to falling back to 0 to test the 500 error we were getting
❌ 54 Tests Failed:
View the top 3 failed tests by shortest run time
To view individual test run time comparison to the main branch, go to the Test Analytics Dashboard |
This pull request 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 add the label "A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀 |
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 remove the label "A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀 |
This is not actually code that will be merged, but since we can't test metric alerts locally fully I pulled out the code we are having trouble with in production to be able to test it locally and make sure everything is working.