Skip to content

Inconsistent retry and timeout behavior across exporters #6920

Open
@XSAM

Description

@XSAM

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.

// WithTimeout sets the max amount of time a client will attempt to export a
// batch of spans. This takes precedence over any retry settings defined with
// WithRetry, once this time limit has been reached the export is abandoned
// and the batch of spans is dropped.
//
// If unset, the default timeout will be set to 10 seconds.
func WithTimeout(duration time.Duration) Option {

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

resp, err := d.client.Do(request.Request)

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: #6588
Related spec topic: it is unclear to me how the timeout of the exporter works with retry: open-telemetry/opentelemetry-specification#4138

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpkg:exporter:otlpRelated to the OTLP exporter package

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions