Repository navigation
Conversation
|
|
Pull request dashboard statusWaiting on reviewers · refreshed 2026-10-13 07:49 UTC Review the latest changes. Status above doesn't look right?
|
JaegerRemoteSampler built a new sampler from every poll response, even when the strategy had not changed. For a RATE_LIMITING strategy that means a new RateLimiter with a full balance on every poll, so under load each poll lets through up to maxTracesPerSecond extra traces. Remember the last applied response and keep the current sampler when the response bytes are the same. Keeping the limiter state when only the rate changes is left for a follow-up. Part of open-telemetry#2465
liotur
force-pushed
the
jaeger-remote-sampler-keep-unchanged-strategy
branch
from
October 13, 2026 07:17
df22bfd to
ede2837
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8946 +/- ##
=========================================
Coverage 90.65% 90.66%
- Complexity 10887 10889 +2
=========================================
Files 1015 1015
Lines 29731 29738 +7
Branches 3876 3877 +1
=========================================
+ Hits 26953 26961 +8
Misses 1860 1860
+ Partials 918 917 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Part of #2465
JaegerRemoteSamplerbuilds a new sampler from every poll response, even when the strategy has not changed. For aRATE_LIMITINGstrategy that means a newRateLimiterthat starts with a full balance, so under load each poll (every 60 seconds by default) lets through up tomaxTracesPerSecondextra traces.This change remembers the last applied response and keeps the current sampler when the response bytes are the same. If the bytes differ for any reason, the sampler is rebuilt as it is today. The bytes are saved only after the new sampler is built, so a response that fails to parse does not cause the next unchanged response to rebuild the sampler. The sender handles responses asynchronously and the next poll does not wait for the previous response, so two responses can be handled at the same time; a dedicated lock keeps the sampler and the saved bytes in step. Comparing raw bytes keeps the change small; I can compare the decoded
SamplingStrategyResponseinstead if you prefer.This covers the first part of the issue. Keeping the limiter's state when only the rate changes (the
Update()approach from jaeger-client-go mentioned in the issue) needs aRateLimiterthat can change its rate in place, and that class lives in sdk-common's internal package, so I'd rather do it in a separate PR and leave the issue open. For comparison, jaeger-client-java also replaced its rate limiting sampler with a new one whenever the rate changed.Added
JaegerRemoteSamplerTest#unchangedStrategy_keepsSampler, which fails without the fix and passes with it../gradlew :sdk-extensions:jaeger-remote-sampler:checkpasses.