Skip to content

Commit

Permalink
Add a source of the backoff strategy
Browse files Browse the repository at this point in the history
  • Loading branch information
krnowak committed Jan 8, 2021
1 parent 3ea4025 commit 93e8c25
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions exporters/otlp/otlphttp/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,11 @@ func getWaitDuration(backoff time.Duration, i int) time.Duration {
// k * initialBackoff + jitter, where k is a random number in
// range [0, 2^n-1), and jitter is a random percentage of
// initialBackoff from [-5%, 5%).
//
// Based on
// https://en.wikipedia.org/wiki/Exponential_backoff#Example_exponential_backoff_algorithm
//
// Jitter is our addition.

// There won't be an overflow, since i is capped to
// DefaultMaxAttempts (5).
Expand Down

0 comments on commit 93e8c25

Please sign in to comment.