Add configurable retry jitter - #4517
Open
jaxalo wants to merge 1 commit into
Open
Conversation
jaxalo
marked this pull request as draft
August 28, 2026 13:51
jaxalo
marked this pull request as ready for review
August 28, 2026 15:41
amaskara-dd
approved these changes
Aug 28, 2026
Author
|
/merge |
|
View all feedbacks in Devflow UI.
It will be processed automatically as soon as GitHub reports it as mergeable. View in MergeQueue UI.
devflow unqueued this merge request: It did not become mergeable within the expected time |
3 tasks
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.
What does this PR do?
Adds an optional
RetryJitterduration to the API client retry configuration. When set, each 429 or 5xx retry delay receives an additive random delay in[0, RetryJitter).The zero value keeps the existing deterministic retry behavior unchanged. Applying jitter to rate-limit reset retries as well as exponential backoff prevents clients with identical settings from retrying in lockstep.
Additional Notes
This is the prerequisite for exposing retry jitter in the Terraform provider.
Tested with:
go test ./api/datadoggo test ./api/datadog -run '^TestRetryJitter$' -count=20cd tests && go test ./apihttptestserver returning HTTP 500; observed retry gaps of 2.469s and 2.126s with a 2s backoff and 500ms jitterReview checklist