Skip to content
This repository has been archived by the owner on Dec 6, 2024. It is now read-only.

Use gRPC status code to indicate retryable and not retryable errors #65

Conversation

tigrannajaryan
Copy link
Member

OTLP proposal originally used a separate ResultCode enumeration for server
to tell the client whether the failed request can be retried or no.

After discussion here open-telemetry/opentelemetry-proto#47 (comment)
it became clear that the goal can be achieved using gRPC status codes without
a need for custom enumeration.

This change removes the ResultCode and explains how to use gRPC status codes.

@tigrannajaryan tigrannajaryan force-pushed the feature/tigran/otlp_statuscodes branch from bdd91f5 to 14ae6d6 Compare November 15, 2019 15:34
@tigrannajaryan
Copy link
Member Author

@open-telemetry/specs-approvers please have a look. We need this correction to finalize the protocol.

@tigrannajaryan tigrannajaryan force-pushed the feature/tigran/otlp_statuscodes branch from 5ec9304 to 9c41ede Compare November 20, 2019 00:49
@tigrannajaryan
Copy link
Member Author

@open-telemetry/specs-approvers please review.

@bogdandrutu
Copy link
Member

Please review @open-telemetry/specs-approvers

@bogdandrutu bogdandrutu requested a review from arminru as a code owner March 10, 2020 12:55
@bogdandrutu
Copy link
Member

Please review @open-telemetry/specs-approvers

@Oberon00
Copy link
Member

I'm against using grpc codes to encode retryability. You can argue about the retryability of each single error code. I'm fine with adding an grpc code as additional information (though I think a string with an error message would be even better) to boolean isRetryable.

@tigrannajaryan
Copy link
Member Author

I'm against using grpc codes to encode retryability. You can argue about the retryability of each single error code. I'm fine with adding an grpc code as additional information (though I think a string with an error message would be even better) to boolean isRetryable.

I agree that arguing about each single error is unfortunate. The problem is that we have to do it regardless. The protocol uses gRPC and you will get a gRPC code in response to the call and you have to make a decision about what to do for each particular code even if we decide to use explicit isRetryable boolean.

We can't escape this discussion unless we choose to ignore error handling.

Copy link
Contributor

@jmacd jmacd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(repeat approval)

@tigrannajaryan
Copy link
Member Author

@open-telemetry/specs-approvers Please review. We are not going to have OTLP protocol for Beta unless this has a quick resolution.

@tigrannajaryan
Copy link
Member Author

Any more thoughts on this? We need to approve or reject this (unclear what to do if rejected) to implement OTLP.

@tigrannajaryan tigrannajaryan force-pushed the feature/tigran/otlp_statuscodes branch from 6b32604 to 3b4f3ba Compare March 12, 2020 15:47
@carlosalberto
Copy link
Contributor

@tigrannajaryan Looks great! A few, very minor details to fix/update, but otherwise LGTM

@tigrannajaryan
Copy link
Member Author

@open-telemetry/specs-approvers this is one of the issues that delays implementation of OTLP protocol. Please review.

OTLP proposal originally used a separate ResultCode enumeration for server
to tell the client whether the failed request can be retried or no.

After discussion here open-telemetry/opentelemetry-proto#47 (comment)
it became clear that the goal can be achieved using gRPC status codes without
a need for custom enumeration.

This change removes the ResultCode and explains how to use gRPC status codes.
@tigrannajaryan tigrannajaryan force-pushed the feature/tigran/otlp_statuscodes branch from 3b4f3ba to 415f5f7 Compare March 18, 2020 20:26
@tigrannajaryan
Copy link
Member Author

@open-telemetry/specs-approvers all comments are replied / resolved. PTAL and merge if OK.

@yurishkuro yurishkuro merged commit be2a3fc into open-telemetry:master Mar 18, 2020
@tigrannajaryan tigrannajaryan deleted the feature/tigran/otlp_statuscodes branch March 18, 2020 21:40
@tigrannajaryan
Copy link
Member Author

@open-telemetry/specs-approvers what is the best way to let all language SIGs know about this change? They will need to change OTLP implementation to match this.

@arminru
Copy link
Member

arminru commented Mar 23, 2020

@tigrannajaryan That's a general issue that applies to all spec changes and we should introduce a proper process here. Sometimes changes go unnoticed by some SIGs where sometimes this is discovered weeks/months later and most probably a few times not at all.

Currently, the safest, while most tedious way would be to manually open an issue in each SIG to which that change applies.
Let's find better alternatives on open-telemetry/community#317.

carlosalberto pushed a commit to carlosalberto/oteps that referenced this pull request Oct 23, 2024
…pen-telemetry#65)

OTLP proposal originally used a separate ResultCode enumeration for server
to tell the client whether the failed request can be retried or no.

After discussion here open-telemetry/opentelemetry-proto#47 (comment)
it became clear that the goal can be achieved using gRPC status codes without
a need for custom enumeration.

This change removes the ResultCode and explains how to use gRPC status codes.

Co-authored-by: Yuri Shkuro <[email protected]>
carlosalberto pushed a commit to carlosalberto/oteps that referenced this pull request Oct 23, 2024
…pen-telemetry#65)

OTLP proposal originally used a separate ResultCode enumeration for server
to tell the client whether the failed request can be retried or no.

After discussion here open-telemetry/opentelemetry-proto#47 (comment)
it became clear that the goal can be achieved using gRPC status codes without
a need for custom enumeration.

This change removes the ResultCode and explains how to use gRPC status codes.

Co-authored-by: Yuri Shkuro <[email protected]>
carlosalberto pushed a commit to carlosalberto/oteps that referenced this pull request Oct 30, 2024
…pen-telemetry#65)

OTLP proposal originally used a separate ResultCode enumeration for server
to tell the client whether the failed request can be retried or no.

After discussion here open-telemetry/opentelemetry-proto#47 (comment)
it became clear that the goal can be achieved using gRPC status codes without
a need for custom enumeration.

This change removes the ResultCode and explains how to use gRPC status codes.

Co-authored-by: Yuri Shkuro <[email protected]>
carlosalberto pushed a commit to open-telemetry/opentelemetry-specification that referenced this pull request Nov 8, 2024
…pen-telemetry/oteps#65)

OTLP proposal originally used a separate ResultCode enumeration for server
to tell the client whether the failed request can be retried or no.

After discussion here open-telemetry/opentelemetry-proto#47 (comment)
it became clear that the goal can be achieved using gRPC status codes without
a need for custom enumeration.

This change removes the ResultCode and explains how to use gRPC status codes.

Co-authored-by: Yuri Shkuro <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants