From 796b2a84128f892e78620cc6f84388a21d5dbaca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ask=20Bj=C3=B8rn=20Hansen?= Date: Sun, 27 Jul 2025 17:13:06 -0700 Subject: [PATCH] tracing: enable retrying otlp requests when using http --- tracing/tracing.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tracing/tracing.go b/tracing/tracing.go index d389879..e7c9c87 100644 --- a/tracing/tracing.go +++ b/tracing/tracing.go @@ -335,6 +335,13 @@ func newOLTPExporter(ctx context.Context, cfg *TracerConfig) (sdktrace.SpanExpor opts = append(opts, otlptracehttp.WithEndpointURL(cfg.EndpointURL)) } + opts = append(opts, otlptracehttp.WithRetry(otlptracehttp.RetryConfig{ + Enabled: true, + InitialInterval: 3 * time.Second, + MaxInterval: 60 * time.Second, + MaxElapsedTime: 5 * time.Minute, + })) + client = otlptracehttp.NewClient(opts...) default: return nil, errInvalidOTLPProtocol