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

otlptracegrpc otlpmetricgrpc: Handling RESOURCE_EXHAUSTED #4661

Closed
pellared opened this issue Oct 23, 2023 · 0 comments · Fixed by #4669
Closed

otlptracegrpc otlpmetricgrpc: Handling RESOURCE_EXHAUSTED #4661

pellared opened this issue Oct 23, 2023 · 0 comments · Fixed by #4669
Assignees
Labels
bug Something isn't working pkg:exporter:otlp Related to the OTLP exporter package

Comments

@pellared
Copy link
Member

pellared commented Oct 23, 2023

Description

From specification:

The client SHOULD interpret RESOURCE_EXHAUSTED code as retryable only if the server signals that the recovery from resource exhaustion is possible.
This is signaled by the server by returning a status containing RetryInfo.
In this case the behavior of the server and the client is exactly as described in OTLP/gRPC Throttling section. If no such status is returned, then the RESOURCE_EXHAUSTED code SHOULD be treated as non-retryable.

Current behavior

// retryable returns if err identifies a request that can be retried and a
// duration to wait for if an explicit throttle time is included in err.
func retryable(err error) (bool, time.Duration) {
s := status.Convert(err)
switch s.Code() {
case codes.Canceled,
codes.DeadlineExceeded,
codes.ResourceExhausted,
codes.Aborted,
codes.OutOfRange,
codes.Unavailable,
codes.DataLoss:
return true, throttleDelay(s)
}
// Not a retry-able error.
return false, 0
}

RESOURCE_EXHAUSTED is always treated as retryable.

Expected behavior

Follow the specification.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pkg:exporter:otlp Related to the OTLP exporter package
Projects
No open projects
1 participant