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

BREAKING: Change span statuses for gRPC server spans #3333

Merged
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ release.
([#3271](https://github.com/open-telemetry/opentelemetry-specification/pull/3271))
- BREAKING: remove `messaging.destination.kind` and `messaging.source.kind`.
([#3214](https://github.com/open-telemetry/opentelemetry-specification/pull/3214))
- BREAKING: Change span statuses for gRPC server spans.
([#3333](https://github.com/open-telemetry/opentelemetry-specification/pull/3333))

### Compatibility

Expand Down
26 changes: 25 additions & 1 deletion specification/trace/semantic_conventions/rpc.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,31 @@ For remote procedure calls via [gRPC][], additional conventions are described in

### gRPC Status

The [Span Status](../api.md#set-status) MUST be left unset for an `OK` gRPC status code, and set to `Error` for all others.
The table below describes when
the [Span Status](../api.md#set-status) MUST be set
to `Error`
pellared marked this conversation as resolved.
Show resolved Hide resolved
depending on the [gRPC status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md)
and [Span Kind](../api.md#spankind).

| gRPC Status Number | gRPC Status Code | `SpanKind.SERVER` Span Status | `SpanKind.CLIENT` Span Status |
pellared marked this conversation as resolved.
Show resolved Hide resolved
|---|---|---|---|
| `0` | OK | unset | unset |
| `1` | CANCELLED | unset | `Error` |
| `2` | UNKNOWN | `Error` | `Error` |
| `3` | INVALID_ARGUMENT | unset | `Error` |
| `4` | DEADLINE_EXCEEDED | `Error` | `Error` |
| `5` | NOT_FOUND | unset | `Error` |
| `6` | ALREADY_EXISTS | unset | `Error` |
| `7` | PERMISSION_DENIED | unset | `Error` |
| `8` | RESOURCE_EXHAUSTED | unset| `Error` |
| `9` | FAILED_PRECONDITION | unset | `Error` |
| `10` | ABORTED | unset | `Error` |
| `11` | OUT_OF_RANGE | unset | `Error` |
| `12` | UNIMPLEMENTED | unset | `Error` |
| `13` | INTERNAL | `Error` | `Error` |
| `14` | UNAVAILABLE | `Error` | `Error` |
| `15` | DATA_LOSS | `Error` | `Error` |
| `16` | UNAUTHENTICATED | unset | `Error` |

### gRPC Request and Response Metadata

Expand Down