Skip to content

Clarify how export retry should be implemented #4138

Open
@brettmc

Description

@brettmc

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:

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

Python:

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    spec:traceRelated to the specification/trace directorytriage:deciding:community-feedbackOpen to community discussion. If the community can provide sufficient reasoning, it may be accepted

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions