-
Notifications
You must be signed in to change notification settings - Fork 375
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
DEBUG-2334 default token bucket allow? size to 1 #3882
Conversation
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.
👍 LGTM
The only usage of token bucket rate limiter currently in our code uses a size of 1 (to perform one action). Default the size parameter to 1 to simplify the API for using token bucket on the caller side. Dynamic instrumentation will also use token bucket and will also call allow? with the size of 1.
aa35d8a
to
2d10912
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #3882 +/- ##
==========================================
+ Coverage 97.85% 97.87% +0.01%
==========================================
Files 1277 1277
Lines 76392 76403 +11
Branches 3744 3744
==========================================
+ Hits 74757 74779 +22
+ Misses 1635 1624 -11 ☔ View full report in Codecov by Sentry. |
I will merge this and it looks like #3886 is attempting to repair the ASM test failures. |
* master: Add a check that ruleset file still exists to appsec:ruleset:update Add argument presence checks for appsec:ruleset:update Add Github Token as argument to appsec:ruleset:update task Add comments about deadlock risk Refactor with default level Refactor with Logger module DEBUG-2334 default token bucket allow? size to 1 (DataDog#3882) Fix system tests (DataDog#3883) Inject telemetry component Update gemfiles/* Add fiddle gem to Gemfile for Ruby >= 3.3 Add ostruct to Gemfile for Ruby >= 3.3
The only usage of token bucket rate limiter currently in our code uses a size of 1 (to perform one action). Default the size parameter to 1 to simplify the API for using token bucket on the caller side. Dynamic instrumentation will also use token bucket and will also call allow? with the size of 1. Co-authored-by: Oleg Pudeyev <code@olegp.name>
What does this PR do?
The only usage of token bucket rate limiter currently in our code uses a size of 1 (to perform one action). Default the size parameter to 1 to simplify the API for using token bucket on the caller side.
Motivation:
Dynamic instrumentation will also use token bucket and will also call allow? with the size of 1.
Additional Notes:
How to test the change?
Unit tests