Inconsistent retry and timeout behavior across exporters

Author: XSAMCreated Jun 21, 2025Updated Sep 23, 2026
Labelsbugpkg:exporter:otlp

Description

otlptracegrpc states that the timeout takes precedence over retry setting, once this time limit has been reached the export is abandoned and the batch of spans is dropped.

https://github.com/open-telemetry/opentelemetry-go/blob/a85ae98dcedc0761078518a715dea53e519b4846/exporters/otlp/otlptrace/otlptracegrpc/options.go#L185-L191

But otlptracehttp uses a different approach where the retry is over the WithTimeout.

https://github.com/open-telemetry/opentelemetry-go/blob/a85ae98dcedc0761078518a715dea53e519b4846/exporters/otlp/otlptrace/otlptracehttp/client.go#L79

https://github.com/open-telemetry/opentelemetry-go/blob/a85ae98dcedc0761078518a715dea53e519b4846/exporters/otlp/otlptrace/otlptracehttp/client.go#L156

The resp, err := d.client.Do(request.Request) runs inside the d.requestFunc, which means the timeout of the client won't abandon the retry.

Expected behavior

The retry mechanism should be identical across exporters.

Related: https://github.com/open-telemetry/opentelemetry-go/issues/6588 Related spec topic: it is unclear to me how the timeout of the exporter works with retry: https://github.com/open-telemetry/opentelemetry-specification/issues/4138

Source: open-telemetry/opentelemetry-go