-
-
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
feat(escalating-issues): Create Metrics Query for is_escalating #57249
feat(escalating-issues): Create Metrics Query for is_escalating #57249
Conversation
src/sentry/issues/escalating.py
Outdated
use_case_id=UseCaseID.ESCALATING_ISSUES, | ||
) | ||
|
||
metrics_hourly_count = next( |
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.
using next(iter())
to safely get the first item in an array
""" | ||
|
||
if group.issue_category != GroupCategory.ERROR: | ||
raise Exception("Invalid category.") |
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.
Is raising an error going to disrupt any important processes? should we log and move on instead?
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.
we currently only call this function when the category is GroupCategory.ERROR
. I made this error incase anyone else wants to use this query. I can handle this exception in the caller func.
try: | ||
metrics_query = _query_metrics_for_group_hourly_count(group, now, current_hour) | ||
except Exception as e: | ||
logger.info( |
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.
should this be logger.error / captured in sentry?
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.
Nah I don't think this is an actionable error. So I'd rather keep this in GCP.
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 🥀 |
Objective:
We want to start making queries to the Generic Metrics backend during post_process where we check if a Group has started
escalating
. However, I want to check if the results from the queries are equivalent to the results from the Dataset queries. So we will still rely on the Dataset queries to fetch the current hour's count and if the values are not equal, we will log an exception in Sentry for visibility.