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

feat(escalating-issues): Create Metrics Query for is_escalating #57249

Conversation

NisanthanNanthakumar
Copy link
Contributor

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.

@NisanthanNanthakumar NisanthanNanthakumar requested a review from a team as a code owner September 29, 2023 23:21
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Sep 29, 2023
use_case_id=UseCaseID.ESCALATING_ISSUES,
)

metrics_hourly_count = next(
Copy link
Contributor Author

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.")
Copy link
Member

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?

Copy link
Contributor Author

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(
Copy link
Member

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?

Copy link
Contributor Author

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.

@getsantry
Copy link
Contributor

getsantry bot commented Oct 24, 2023

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 Waiting for: Community, I will leave it alone ... forever!


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

@getsantry getsantry bot added the Stale label Oct 24, 2023
@getsantry getsantry bot closed this Nov 1, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Nov 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Scope: Backend Automatically applied to PRs that change backend components Stale
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants