Repository navigation
Preserve the Jaeger rate limiter balance on rate changes - #9094
Open
yangjj-iso wants to merge 3 commits into
Open
yangjj-iso wants to merge 3 commits into
yangjj-iso wants to merge 3 commits into
Conversation
Apply rate changes to the existing rate-limiting sampler and transfer only its available credits, capped at the new capacity.
Pull request dashboard statusWaiting on reviewers · refreshed 2026-12-04 12:18 UTC Review the latest changes. Status above doesn't look right?
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9094 +/- ##
============================================
- Coverage 90.54% 90.51% -0.03%
- Complexity 11254 11268 +14
============================================
Files 1040 1040
Lines 30703 30766 +63
Branches 4015 4031 +16
============================================
+ Hits 27799 27848 +49
- Misses 1928 1934 +6
- Partials 976 984 +8 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Signed-off-by: redyyang <3202137046@qq.com>
yangjj-iso
marked this pull request as ready for review
December 4, 2026 11:29
Signed-off-by: redyyang <3202137046@qq.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2465. #8946 already retains the sampler when polling returns an unchanged strategy.
A rate change within the rate-limiting strategy now preserves the available credits, capped by the new capacity, and subsequent refills use the new rate. Strategy changes still construct their own sampler. Sampling and reconfiguration are serialized within the Jaeger rate-limiting sampler so a concurrent sample cannot spend the same credits twice during transfer.
The focused Jaeger sampler tests and
sdk:commonrate limiter tests passed on JDK 25. The clock-controlled test spends the original budget, changes the rate, and checks the transferred credits and later refill. Spotless was applied.Codex assisted with implementation and verification.
Follow-up verification: a second clock-controlled test decreases the rate and checks that retained credits are capped at the new capacity, then verifies subsequent refill. The Jaeger sampler suite had 27 passing tests and 3 Docker-dependent skips. All 367
sdk:commontests and Spotless checks for both modules passed on JDK 25.At
1d3cbb9c, a clock-controlled regression covers changing the rate to zero and enabling it again. Sampling stays off during the zero-rate interval and resumes after the newly configured rate earns its first credit. Local verification passed 28 Jaeger sampler tests and 367sdk:commontests on JDK 25. Three Jaeger tests that require Docker were skipped.