-
Couldn't load subscription status.
- Fork 1.2k
Closed
Description
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) OptionState 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.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request