Skip to content

ref(rules): Add batch_query_hook to EventFrequencyPercentCondition#68765

Merged
ceorourke merged 6 commits into
masterfrom
ceorourke/eventfrequencypercentcondition
Apr 16, 2024
Merged

ref(rules): Add batch_query_hook to EventFrequencyPercentCondition#68765
ceorourke merged 6 commits into
masterfrom
ceorourke/eventfrequencypercentcondition

Conversation

@ceorourke

Copy link
Copy Markdown
Member

Another follow up to #68672 and a part 3 of https://github.com/getsentry/team-core-product-foundations/issues/239 to add a batch_query_hook function for the EventFrequencyPercentCondition.

@ceorourke ceorourke marked this pull request as ready for review April 11, 2024 23:49
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Apr 11, 2024
Comment thread src/sentry/rules/conditions/event_frequency.py Outdated
percent_intervals[self.get_option("interval")][1].total_seconds() // 60
)
avg_sessions_in_interval = session_count_last_hour / (60 / interval_in_minutes)
error_issues = [

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just calling out that I'm fairly certain this condition only applies to error issues, so I just pulled those one so we're not attempting to query snuba on other issues that are definitely going to return 0 and is useless data.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice, is there anything we should do to ensure this only goes to error issues?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be sufficient, I guess we could pull them out before calling this but it doesn't really matter.

@codecov

codecov Bot commented Apr 11, 2024

Copy link
Copy Markdown

Bundle Report

Changes will increase total bundle size by 1.31kB ⬆️

Bundle name Size Change
sentry-webpack-bundle-array-push 26.3MB 1.31kB ⬆️

@ceorourke ceorourke requested a review from a team April 11, 2024 23:53
Comment thread src/sentry/rules/conditions/event_frequency.py Outdated
percent_intervals[self.get_option("interval")][1].total_seconds() // 60
)
avg_sessions_in_interval = session_count_last_hour / (60 / interval_in_minutes)
error_issues = [

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice, is there anything we should do to ensure this only goes to error issues?

Comment thread tests/snuba/rules/conditions/test_event_frequency.py Outdated
Comment thread tests/snuba/rules/conditions/test_event_frequency.py Outdated

@saponifi3d saponifi3d left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@ceorourke ceorourke merged commit 9829836 into master Apr 16, 2024
@ceorourke ceorourke deleted the ceorourke/eventfrequencypercentcondition branch April 16, 2024 20:44
@sentry

sentry Bot commented Apr 16, 2024

Copy link
Copy Markdown
Contributor

Suspect Issues

This pull request was deployed and Sentry observed the following issues:

  • ‼️ SnubaError: HTTPConnectionPool(host='127.0.0.1', port=10006): Max retries exceeded with url: /metrics/snql (C... sentry.tasks.post_process.post_process_group View Issue

Did you find this useful? React with a 👍 or 👎

@github-actions github-actions Bot locked and limited conversation to collaborators May 16, 2024
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants