diff --git a/CHANGELOG.md b/CHANGELOG.md index f4a63defd60..09c20979e87 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -56,6 +56,8 @@ release. ([#3097](https://github.com/open-telemetry/opentelemetry-specification/pull/3097)) - Clarify stability requirements of semantic conventions ([#3225](https://github.com/open-telemetry/opentelemetry-specification/pull/3225)) +- BREAKING: Change span statuses for gRPC server spans. + ([#3333](https://github.com/open-telemetry/opentelemetry-specification/pull/3333)) ### Compatibility diff --git a/specification/trace/semantic_conventions/rpc.md b/specification/trace/semantic_conventions/rpc.md index f5d6e823457..b70a97fa77b 100644 --- a/specification/trace/semantic_conventions/rpc.md +++ b/specification/trace/semantic_conventions/rpc.md @@ -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` or remain unset +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 Code | `SpanKind.SERVER` Span Status | `SpanKind.CLIENT` Span Status | +|---|---|---| +| OK | unset | unset | +| CANCELLED | unset | `Error` | +| UNKNOWN | `Error` | `Error` | +| INVALID_ARGUMENT | unset | `Error` | +| DEADLINE_EXCEEDED | `Error` | `Error` | +| NOT_FOUND | unset | `Error` | +| ALREADY_EXISTS | unset | `Error` | +| PERMISSION_DENIED | unset | `Error` | +| RESOURCE_EXHAUSTED | unset| `Error` | +| FAILED_PRECONDITION | unset | `Error` | +| ABORTED | unset | `Error` | +| OUT_OF_RANGE | unset | `Error` | +| UNIMPLEMENTED | `Error` | `Error` | +| INTERNAL | `Error` | `Error` | +| UNAVAILABLE | `Error` | `Error` | +| DATA_LOSS | `Error` | `Error` | +| UNAUTHENTICATED | unset | `Error` | ### gRPC Request and Response Metadata