OpenTelemetry.Exporter.OpenTelemetryProtocol.Implementation.ExportClient.OtlpRetry
Implementation of the OTLP retry policy used by both OTLP/gRPC and OTLP/HTTP.
OTLP/gRPC
https://github.com/open-telemetry/opentelemetry-proto/blob/main/docs/specification.md#failures
OTLP/HTTP
https://github.com/open-telemetry/opentelemetry-proto/blob/main/docs/specification.md#failures-1
The specification requires retries use an exponential backoff strategy,
but does not provide specifics for the implementation. As such, this
implementation is inspired by the retry strategy provided by
Grpc.Net.Client which implements the gRPC retry specification.
Grpc.Net.Client retry implementation
https://github.com/grpc/grpc-dotnet/blob/83d12ea1cb628156c990243bc98699829b88738b/src/Grpc.Net.Client/Internal/Retry/RetryCall.cs#L94
gRPC retry specification
https://github.com/grpc/proposal/blob/master/A6-client-retries.md
The gRPC retry specification outlines configurable parameters used in its
exponential backoff strategy: initial backoff, max backoff, backoff
multiplier, and max retry attempts. The OTLP specification does not declare
a similar set of parameters, so this implementation uses fixed settings.
Furthermore, since the OTLP spec does not specify a max number of attempts,
this implementation will retry until the deadline is reached.
The throttling mechanism for OTLP differs from the throttling mechanism
described in the gRPC retry specification. See:
https://github.com/open-telemetry/opentelemetry-proto/blob/main/docs/specification.md#otlpgrpc-throttling.
Determines whether a failed gRPC export response represents a transient
failure that is eligible to be retried, ignoring any deadline.
Determines whether a failed HTTP export response represents a transient
failure that is eligible to be retried, ignoring any deadline.
public static bool TryGetGrpcRetryResult(ExportClientGrpcResponse response, int retryDelayMilliseconds, out RetryResult retryResult)
public static bool TryGetHttpRetryResult(ExportClientHttpResponse response, int retryDelayInMilliSeconds, out RetryResult retryResult)