Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unify OTLP HTTP and gRPC retry settings #2024

Closed
paivagustavo opened this issue Jun 21, 2021 · 0 comments · Fixed by #2095
Closed

Unify OTLP HTTP and gRPC retry settings #2024

paivagustavo opened this issue Jun 21, 2021 · 0 comments · Fixed by #2095
Assignees
Labels
enhancement New feature or request

Comments

@paivagustavo
Copy link
Member

Specs defines that the OTLP exporters should retry requests when temporary errors happens. Currently the OTLP HTTP and gRPC exporters have different strategies, with different API.

State of the gRPC exporter API:

// RetrySettings defines configuration for retrying batches in case of export failure
// using an exponential backoff.
type RetrySettings struct {
	// Enabled indicates whether to not retry sending batches in case of export failure.
	Enabled bool
	// InitialInterval the time to wait after the first failure before retrying.
	InitialInterval time.Duration
	// MaxInterval is the upper bound on backoff interval. Once this value is reached the delay between
	// consecutive retries will always be `MaxInterval`.
	MaxInterval time.Duration
	// MaxElapsedTime is the maximum amount of time (including retries) spent trying to send a request/batch.
	// Once this value is reached, the data is discarded.
	MaxElapsedTime time.Duration
}

func WithRetry(settings RetrySettings) Option

State of the HTTP exporter API:

func WithMaxAttempts(maxAttempts int) Option 

func WithBackoff(duration time.Duration) Option 

It would be better if both exporters used the same strategy before we release a stable version.

Personally, I would find it better if both used the RetrySettings configs, as those are more configurable and uses the https://github.com/cenkalti/backoff project for handling the exponential backoff logic.

@paivagustavo paivagustavo added the enhancement New feature or request label Jun 21, 2021
@paivagustavo paivagustavo changed the title Unify OTLP HTTP/gRPC retry settings Unify OTLP HTTP and gRPC retry settings Jun 21, 2021
@MrAlias MrAlias added this to To do in OpenTelemetry Go 1.0.0 via automation Jun 21, 2021
@MrAlias MrAlias self-assigned this Jul 1, 2021
@MrAlias MrAlias moved this from To do to In progress in OpenTelemetry Go 1.0.0 Jul 15, 2021
OpenTelemetry Go 1.0.0 automation moved this from In progress to Done Jul 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

2 participants