tracing: enable retrying otlp requests when using http

This commit is contained in:
Ask Bjørn Hansen 2025-07-27 17:13:06 -07:00
parent 6a3bc7bab3
commit 796b2a8412

View File

@ -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