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(ddm): Implement global abuse limits for metrics #64574

Merged
merged 10 commits into from
Feb 7, 2024
Merged

feat(ddm): Implement global abuse limits for metrics #64574

merged 10 commits into from
Feb 7, 2024

Conversation

TBS1996
Copy link
Contributor

@TBS1996 TBS1996 commented Feb 5, 2024

Implements global abuse limit for metric buckets.

Relay: getsentry/relay#2928
Epic: getsentry/relay#2716

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Feb 5, 2024
Copy link

codecov bot commented Feb 5, 2024

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (aa2e6f2) 81.36% compared to head (8eb6ff6) 81.30%.
Report is 10 commits behind head on master.

❗ Current head 8eb6ff6 differs from pull request most recent head 88b831c. Consider uploading reports for the commit 88b831c to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #64574      +/-   ##
==========================================
- Coverage   81.36%   81.30%   -0.07%     
==========================================
  Files        5236     5245       +9     
  Lines      231130   232306    +1176     
  Branches    45348    45535     +187     
==========================================
+ Hits       188058   188869     +811     
- Misses      37220    37577     +357     
- Partials     5852     5860       +8     
Files Coverage Δ
src/sentry/options/defaults.py 100.00% <100.00%> (ø)
src/sentry/quotas/base.py 94.79% <100.00%> (+0.03%) ⬆️
static/app/components/charts/baseChart.tsx 60.60% <ø> (ø)
...tatic/app/components/charts/components/tooltip.tsx 4.08% <0.00%> (-0.05%) ⬇️

... and 420 files with indirect coverage changes

@TBS1996 TBS1996 marked this pull request as ready for review February 7, 2024 10:31
@TBS1996 TBS1996 requested a review from a team as a code owner February 7, 2024 10:31
assert quotas[5].scope == QuotaScope.GLOBAL
assert quotas[5].scope_id is None
assert quotas[5].categories == {DataCategory.METRIC_BUCKET}
assert quotas[5].limit == 6040
Copy link
Contributor

Choose a reason for hiding this comment

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

where is this number coming from?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Above here I set the limit to 604.

self.organization.update_option("global-abuse-quota.metric-bucket-limit", 604)

since the abuse_window is 10 seconds its multiplied by 10

@TBS1996 TBS1996 enabled auto-merge (squash) February 7, 2024 13:50
@TBS1996 TBS1996 merged commit 67cdb97 into master Feb 7, 2024
48 checks passed
@TBS1996 TBS1996 deleted the globuse branch February 7, 2024 14:20
@github-actions github-actions bot locked and limited conversation to collaborators Feb 23, 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.

4 participants