feat(otlp-exporter-base): make better use of retry timeout#6260
Open
jsokol805 wants to merge 2 commits intoopen-telemetry:mainfrom
Open
feat(otlp-exporter-base): make better use of retry timeout#6260jsokol805 wants to merge 2 commits intoopen-telemetry:mainfrom
jsokol805 wants to merge 2 commits intoopen-telemetry:mainfrom
Conversation
Before these changes, we had effective upper limit of ~15s that we used to try to send data (intial 1s delay, 20% jitter, max 5 attempts). Let's keep the user API the same (just upper timeout limit), but make sure we use up our budget: - Bump max attempts to 20 - Make max backoff dynamic, 20% of whole timeout This way the behavior better matches user intent - if someone sets e.g. 5 minute timeout, we will do ~13 attempts, with last attempt happening after 4 minutes. We still keep the minimal backoff of 1000ms which should prevent excessive load on servers.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6260 +/- ##
==========================================
- Coverage 95.40% 95.39% -0.01%
==========================================
Files 316 316
Lines 9570 9572 +2
Branches 2214 2214
==========================================
+ Hits 9130 9131 +1
- Misses 440 441 +1
🚀 New features to boost your workflow:
|
|
This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days. |
Member
|
This is currently blocked on #6356 and similar changes in the other SDKs. We currently see issues where if there's not OTel collector, app shutdowns take significantly longer; this PR here would make that issue worse as it stands now. We still want to merge this once the other PR is in though. |
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.
Which problem is this PR solving?
Before these changes, we had effective upper limit of ~15s that we used to try to send data (intial 1s delay, 20% jitter, max 5 attempts).
Short description of the changes
Let's keep the user API the same (just upper timeout limit), but make sure we use up our budget:
This way the behavior better matches user intent - if someone sets e.g. 5 minute timeout, we will do ~13 attempts, with last attempt happening after 4 minutes.
We still keep the minimal backoff of 1000ms which should prevent excessive load on servers.
Type of change
New feature (non-breaking change which adds functionality)
How Has This Been Tested?
Added unit test that checks if we use at least 80% of user-specified timeout
Checklist: