Description
What are you trying to achieve?
I am trying to define exporter retry config in file-based configuration: open-telemetry/opentelemetry-configuration#97
The spec says that the client SHOULD implement an exponential backoff strategy between retries
, but doesn't say anything further.
The consequence of this is that multiple SIGs have implemented an exponential backoff retry strategy, in numerous ways, and using a variety of inputs. Ultimately, I think it means we cannot have a common way to configure the retry strategy of an exporter, because we don't have a common set of inputs.
This is particularly problematic for automatic configuration via file-based configuration, which is trying to unify and extend SDK configuration beyond what is possible with environment variables. It's also problematic for environment variable-based configuration, although less so because SIGs are able to implement their own variables using the language-specific OTEL_<LANG>_FEATURE
.
What I would like to see is that we decide whether a retry strategy should be configurable, and if so work out if it's possible to agree a common set of parameters to control the strategy, so that we can expose to users a mechanism to control the behaviour.
Alternatively, since we do have [https://opentelemetry.io/docs/languages/sdk-configuration/otlp-exporter/#timeout-configuration](timeout configuration), do we make that (ie, the total time spent) the only input variable, and allow language implementations to choose their own, non-configurable, implementation provided they observe that one deadline?
Related issues:
- Clarify and improve the OTLP exporter requirements of a retry strategy #3639
- How to configure timeout and retry of exporter opentelemetry-php#1317
Additional context.
Some examples of the inputs to retry strategy from different SIGs:
Go:
Enabled bool
InitialInterval time.Duration
MaxInterval time.Duration
MaxElapsedTime time.Duration
PHP:
initial_delay
max_retries
max_value (for an exponentially increasing delay time)
Java:
maxAttempts
initialBackoff
maxBackoff
backoffMultiplier
Java mentions specifically in docs that there is "currently no way to customize [the retry policy]": https://github.com/open-telemetry/opentelemetry-java/blob/9543a3451851d82f2f9d8e1b0cd78e2cc133b1a5/sdk-extensions/autoconfigure/README.md#otlp-exporter-retry