-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
ref(rules): Refactor get_rate to be used for bulk queries
#69446
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
Conversation
saponifi3d
left a comment
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.
generally lgtm, curious about the target branch change and your thoughts about get_start_end_from_duration though.
2c53918 to
9c28d73
Compare
|
@saponifi3d idk why I can't reply to your comment about the branch, I'd prefer to find out now rather than later when we have a lot more going on if I somehow fucked this up |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #69446 +/- ##
===========================================
- Coverage 86.21% 79.64% -6.58%
===========================================
Files 2848 6469 +3621
Lines 176602 287223 +110621
Branches 31517 49495 +17978
===========================================
+ Hits 152261 228761 +76500
- Misses 24338 58040 +33702
- Partials 3 422 +419
|
nhsiehgit
left a comment
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.
So we've now added comparison type and interval to the data fixtures to determine our rates?
a few nit comments
b3304fb to
56120ee
Compare
no, nothing is added. I just moved stuff around |
Suspect IssuesThis pull request was deployed and Sentry observed the following issues:
Did you find this useful? React with a 👍 or 👎 |
Suspect IssuesThis pull request was deployed and Sentry observed the following issues:
Did you find this useful? React with a 👍 or 👎 |
The `apply_delayed` rule processor needs to call `get_rate` with bulk Snuba queries (see [this code block](https://github.com/getsentry/sentry/blob/088b9c73b604743864f76bd39a81a3238699d306/src/sentry/rules/processing/delayed_processing.py#L136-L171)), so this PR refactors `get_rate` to handle that.
The `apply_delayed` rule processor needs to call `get_rate` with bulk Snuba queries (see [this code block](https://github.com/getsentry/sentry/blob/088b9c73b604743864f76bd39a81a3238699d306/src/sentry/rules/processing/delayed_processing.py#L136-L171)), so this PR refactors `get_rate` to handle that.
The
apply_delayedrule processor needs to callget_ratewith bulk Snuba queries (see this code block), so this PR refactorsget_rateto handle that.