We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 7a05b95 + 9ff2a8b commit a1693bcCopy full SHA for a1693bc
sdk-exporter/common/src/main/scala/org/typelevel/otel4s/sdk/exporter/otlp/OtlpClient.scala
@@ -170,8 +170,9 @@ private[otlp] object OtlpClient {
170
171
def backoff(attempt: Int): Option[FiniteDuration] =
172
Option.when(attempt < retryPolicy.maxAttempts) {
173
+ val jitterMultiplier = math.random()
174
val next =
- retryPolicy.initialBackoff * attempt.toLong * retryPolicy.backoffMultiplier
175
+ retryPolicy.initialBackoff * attempt.toLong * (jitterMultiplier * retryPolicy.backoffMultiplier)
176
177
val delay =
178
next.min(retryPolicy.maxBackoff)
0 commit comments