From 1480942b68efe8bc4004fec633f220c29190899b Mon Sep 17 00:00:00 2001 From: Liudmila Molkova Date: Wed, 22 Jul 2026 18:33:21 -0700 Subject: [PATCH 1/4] rename rpc.response.status_code -> rpc.status_code --- .chloggen/3919.yaml | 5 ++++ docs/non-normative/compatibility/grpc.md | 8 +++---- docs/non-normative/rpc-migration.md | 8 +++---- docs/otel/sdk-metrics.md | 6 ++--- docs/registry/attributes/rpc.md | 13 +++++----- docs/rpc/connect-rpc.md | 12 +++++----- docs/rpc/dubbo.md | 16 ++++++------- docs/rpc/grpc.md | 16 ++++++------- docs/rpc/json-rpc.md | 12 +++++----- docs/rpc/rpc-metrics.md | 16 ++++++------- docs/rpc/rpc-spans.md | 16 ++++++------- model/mcp/deprecated/common-deprecated.yaml | 2 +- model/otel/metrics.yaml | 2 +- model/rpc/common.yaml | 4 ++-- model/rpc/deprecated/registry-deprecated.yaml | 20 +++++++++++----- model/rpc/registry.yaml | 4 ++-- model/rpc/spans.yaml | 24 +++++++++---------- 17 files changed, 99 insertions(+), 85 deletions(-) create mode 100644 .chloggen/3919.yaml diff --git a/.chloggen/3919.yaml b/.chloggen/3919.yaml new file mode 100644 index 0000000000..24b9a70f4f --- /dev/null +++ b/.chloggen/3919.yaml @@ -0,0 +1,5 @@ +change_type: breaking +component: rpc +note: Rename `rpc.response.status_code` to `rpc.status_code`. +issues: [3870] + diff --git a/docs/non-normative/compatibility/grpc.md b/docs/non-normative/compatibility/grpc.md index d98e287bc3..fbb85b06c6 100644 --- a/docs/non-normative/compatibility/grpc.md +++ b/docs/non-normative/compatibility/grpc.md @@ -52,11 +52,11 @@ and the [OpenTelemetry conventions](/docs/rpc/rpc-metrics.md) for details. | gRPC attribute | OpenTelemetry attribute(s) | Conversion comments | | :----------------- | :--------------------------------- | :------------------- | | `grpc.method` | `rpc.method` | gRPC -> OTel: When the value is `other`, replace it with `_OTHER`
OTel -> gRPC: When the value is `_OTHER`, replace it with `other` | -| `grpc.status` | `rpc.response.status_code` | | +| `grpc.status` | `rpc.status_code` | | | `grpc.target` | | gRPC -> OTel: Drop
OTel -> gRPC: Set `grpc.target` to `{server.address}[:{server.port}]` | | | `server.address` and `server.port` | gRPC -> OTel: Parse the address and port from `grpc.target`
OTel -> gRPC: Drop | | | `rpc.system.name` | gRPC -> OTel: Set to `grpc`
OTel -> gRPC: Drop | -| | `error.type` | gRPC -> OTel: Set to `rpc.response.status_code` when it indicates an error (see [gRPC OpenTelemetry conventions](/docs/rpc/grpc.md))
OTel -> gRPC: Drop | +| | `error.type` | gRPC -> OTel: Set to `rpc.status_code` when it indicates an error (see [gRPC OpenTelemetry conventions](/docs/rpc/grpc.md))
OTel -> gRPC: Drop | ## Spans @@ -75,11 +75,11 @@ per-call server span. | Property | gRPC | OpenTelemetry | Conversion comments | | :---------------------- | :--------------------------------------------------------------- | :--------------------------------------------------------------------------- | :-------------------------------------------------------- | | Span name | `Sent.{method name}` (client)
`Recv.{method name}` (server)
Note: The gRPC span name *may be* of high cardinality in edge cases. | `{rpc.method}` | gRPC -> OTel: Remove the `Sent.` or `Recv.` prefix
OTel -> gRPC: Add the prefix based on the span kind | -| Span status code | `ERROR` when the response status code is not `OK` | `ERROR` for specific error status codes (see the [gRPC OpenTelemetry conventions](/docs/rpc/grpc.md)) | gRPC -> OTel: Parse `rpc.response.status_code` from the status description and set the span status code accordingly
OTel -> gRPC: Set based on `rpc.response.status_code`
| +| Span status code | `ERROR` when the response status code is not `OK` | `ERROR` for specific error status codes (see the [gRPC OpenTelemetry conventions](/docs/rpc/grpc.md)) | gRPC -> OTel: Parse `rpc.status_code` from the status description and set the span status code accordingly
OTel -> gRPC: Set based on `rpc.status_code`
| | Span status description | Code and description (e.g., `UNAVAILABLE, unable to resolve host`)| Description only (the error code is recorded separately) | | | Attributes | | `rpc.system.name` | gRPC -> OTel: set to `grpc`
OTel -> gRPC: drop | | | | `rpc.method` | gRPC -> OTel: parse from the span name
OTel -> gRPC: drop | -| | | `rpc.response.status_code` | gRPC -> OTel: parse from the status description
OTel -> gRPC: drop | +| | | `rpc.status_code` | gRPC -> OTel: parse from the status description
OTel -> gRPC: drop | ### Additional attributes diff --git a/docs/non-normative/rpc-migration.md b/docs/non-normative/rpc-migration.md index 7081f8af05..d261e9cf31 100644 --- a/docs/non-normative/rpc-migration.md +++ b/docs/non-normative/rpc-migration.md @@ -57,8 +57,8 @@ TODO (latest). | `rpc.service` | [#3223](https://github.com/open-telemetry/semantic-conventions/pull/3223) | Removed, integrated into `rpc.method` | | `network.transport` | [#3350](https://github.com/open-telemetry/semantic-conventions/pull/3350) | Removed | | `network.type` | [#2857](https://github.com/open-telemetry/semantic-conventions/pull/2857) | Removed | -| `rpc.grpc.status_code` → `rpc.response.status_code` | [#2920](https://github.com/open-telemetry/semantic-conventions/pull/2920) | Changed from int to string (e.g., `0` → `"OK"`) | -| `rpc.connect_rpc.error_code` → `rpc.response.status_code` | [#2920](https://github.com/open-telemetry/semantic-conventions/pull/2920) | | +| `rpc.grpc.status_code` → `rpc.status_code` | [#2920](https://github.com/open-telemetry/semantic-conventions/pull/2920) | Changed from int to string (e.g., `0` → `"OK"`) | +| `rpc.connect_rpc.error_code` → `rpc.status_code` | [#2920](https://github.com/open-telemetry/semantic-conventions/pull/2920) | | | `rpc.grpc.request.metadata.` | [#3169](https://github.com/open-telemetry/semantic-conventions/pull/3169) | Replaced by `rpc.request.metadata.` | | `rpc.grpc.response.metadata.` | [#3169](https://github.com/open-telemetry/semantic-conventions/pull/3169) | Replaced by `rpc.response.metadata.` | | `rpc.connect_rpc.request.metadata.` | [#3169](https://github.com/open-telemetry/semantic-conventions/pull/3169) | Replaced by `rpc.request.metadata.` | @@ -117,7 +117,7 @@ Metric changes: | `network.type` | [#2857](https://github.com/open-telemetry/semantic-conventions/pull/2857) | Removed | | `server.address` | [#3197](https://github.com/open-telemetry/semantic-conventions/pull/3197) | Changed from Recommended to Opt-In | | `server.port` | [#3197](https://github.com/open-telemetry/semantic-conventions/pull/3197) | Changed from Recommended to Opt-In | -| New: `rpc.response.status_code` | [#2920](https://github.com/open-telemetry/semantic-conventions/pull/2920) | | +| New: `rpc.status_code` | [#2920](https://github.com/open-telemetry/semantic-conventions/pull/2920) | | | New: `error.type` | [#2852](https://github.com/open-telemetry/semantic-conventions/pull/2852) | | @@ -149,7 +149,7 @@ Metric changes: | `network.type` | [#2857](https://github.com/open-telemetry/semantic-conventions/pull/2857) | Removed | | `server.address` | [#3197](https://github.com/open-telemetry/semantic-conventions/pull/3197) | Changed from Recommended to Required | | `server.port` | [#3197](https://github.com/open-telemetry/semantic-conventions/pull/3197) | Changed from Recommended to Conditionally Required | -| New: `rpc.response.status_code` | [#2920](https://github.com/open-telemetry/semantic-conventions/pull/2920) | | +| New: `rpc.status_code` | [#2920](https://github.com/open-telemetry/semantic-conventions/pull/2920) | | | New: `error.type` | [#2852](https://github.com/open-telemetry/semantic-conventions/pull/2852) | | diff --git a/docs/otel/sdk-metrics.md b/docs/otel/sdk-metrics.md index f726dae3f3..57a12a483b 100644 --- a/docs/otel/sdk-metrics.md +++ b/docs/otel/sdk-metrics.md @@ -1302,7 +1302,7 @@ covering the wall-clock duration from the start of the first attempt through the | [`http.response.status_code`](/docs/registry/attributes/http.md) | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | `Recommended` when applicable | int | The HTTP status code of the last HTTP request performed in scope of this export call. | `200` | | [`otel.component.name`](/docs/registry/attributes/otel.md) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | A name uniquely identifying the instance of the OpenTelemetry component within its containing SDK instance. [2] | `otlp_grpc_span_exporter/0`; `custom-name` | | [`otel.component.type`](/docs/registry/attributes/otel.md) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | A name identifying the type of the OpenTelemetry component. [3] | `otlp_grpc_span_exporter`; `com.example.MySpanExporter` | -| [`rpc.response.status_code`](/docs/registry/attributes/rpc.md) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Recommended` when applicable | string | The gRPC status code of the last gRPC request performed in scope of this export call. [4] | `OK`; `DEADLINE_EXCEEDED`; `-32602` | +| [`rpc.status_code`](/docs/registry/attributes/rpc.md) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Recommended` when applicable | string | The gRPC status code of the last gRPC request performed in scope of this export call. [4] | `OK`; `DEADLINE_EXCEEDED`; `-32602` | | [`server.address`](/docs/registry/attributes/server.md) | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | `Recommended` when applicable | string | Server domain name if available without reverse DNS lookup; otherwise, IP address or UNIX domain socket name. [5] | `example.com`; `10.1.2.80`; `/tmp/my.sock` | | [`server.port`](/docs/registry/attributes/server.md) | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | `Recommended` when applicable | int | Server port number. [6] | `80`; `8080`; `443` | @@ -1349,8 +1349,8 @@ These values will therefore be reused in the case of an application restart. **[3] `otel.component.type`:** If none of the standardized values apply, implementations SHOULD use the language-defined name of the type. E.g. for Java the fully qualified classname SHOULD be used in this case. -**[4] `rpc.response.status_code`:** Usually it represents an error code, but may also represent partial success, warning, or differentiate between various types of successful outcomes. -Semantic conventions for individual RPC frameworks SHOULD document what `rpc.response.status_code` means in the context of that system and which values are considered to represent errors. +**[4] `rpc.status_code`:** Usually it represents an error code, but may also represent partial success, warning, or differentiate between various types of successful outcomes. +Semantic conventions for individual RPC frameworks SHOULD document what `rpc.status_code` means in the context of that system and which values are considered to represent errors. **[5] `server.address`:** When observed from the client side, and when communicating through an intermediary, `server.address` SHOULD represent the server address behind any intermediaries, for example proxies, if it's available. diff --git a/docs/registry/attributes/rpc.md b/docs/registry/attributes/rpc.md index 287b5912db..a03d173b93 100644 --- a/docs/registry/attributes/rpc.md +++ b/docs/registry/attributes/rpc.md @@ -18,7 +18,7 @@ This document defines attributes for remote procedure calls. | `rpc.method_original` | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | string | The original name of the method used by the client. | `com.myservice.EchoService/catchAll`; `com.myservice.EchoService/unknownMethod`; `InvalidMethod` | | `rpc.request.metadata.` | ![Development](https://img.shields.io/badge/-development-blue) | string[] | RPC request metadata, `` being the normalized RPC metadata key (lowercase), the value being the metadata values. [2] | `["1.2.3.4", "1.2.3.5"]` | | `rpc.response.metadata.` | ![Development](https://img.shields.io/badge/-development-blue) | string[] | RPC response metadata, `` being the normalized RPC metadata key (lowercase), the value being the metadata values. [3] | `["attribute_value"]` | -| `rpc.response.status_code` | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | string | Status code of the RPC returned by the RPC server or generated by the client [4] | `OK`; `DEADLINE_EXCEEDED`; `-32602` | +| `rpc.status_code` | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | string | Status code of the RPC returned by the RPC server or generated by the client [4] | `OK`; `DEADLINE_EXCEEDED`; `-32602` | | `rpc.system.name` | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | string | The Remote Procedure Call (RPC) system. [5] | `grpc`; `dubbo`; `connectrpc` | **[1] `rpc.method`:** The method name MAY have unbounded cardinality in edge or error cases. @@ -57,8 +57,8 @@ Including all response metadata values can be a security risk - explicit configu For example, a property `my-custom-key` with value `["attribute_value"]` SHOULD be recorded as the `rpc.response.metadata.my-custom-key` attribute with value `["attribute_value"]` -**[4] `rpc.response.status_code`:** Usually it represents an error code, but may also represent partial success, warning, or differentiate between various types of successful outcomes. -Semantic conventions for individual RPC frameworks SHOULD document what `rpc.response.status_code` means in the context of that system and which values are considered to represent errors. +**[4] `rpc.status_code`:** Usually it represents an error code, but may also represent partial success, warning, or differentiate between various types of successful outcomes. +Semantic conventions for individual RPC frameworks SHOULD document what `rpc.status_code` means in the context of that system and which values are considered to represent errors. **[5] `rpc.system.name`:** The client and server RPC systems may differ for the same RPC interaction. For example, a client may use Apache Dubbo or Connect RPC to communicate with a server that uses gRPC since both protocols provide compatibility with gRPC. @@ -85,13 +85,13 @@ Deprecated rpc message attributes. | `message.id` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)
Deprecated, no replacement at this time. | int | Deprecated, no replacement at this time. | | | `message.type` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)
Deprecated, no replacement at this time. | string | Deprecated, no replacement at this time. | `SENT`; `RECEIVED` | | `message.uncompressed_size` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)
Deprecated, no replacement at this time. | int | Deprecated, no replacement at this time. | | -| `rpc.connect_rpc.error_code` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)
Replaced by `rpc.response.status_code`. | string | Deprecated, use `rpc.response.status_code` attribute instead. | `cancelled`; `unknown`; `invalid_argument` | +| `rpc.connect_rpc.error_code` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)
Replaced by `rpc.status_code`. | string | Deprecated, use `rpc.status_code` attribute instead. | `cancelled`; `unknown`; `invalid_argument` | | `rpc.connect_rpc.request.metadata.` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)
Replaced by `rpc.request.metadata`. | string[] | Deprecated, use `rpc.request.metadata` instead. | `["1.2.3.4", "1.2.3.5"]` | | `rpc.connect_rpc.response.metadata.` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)
Replaced by `rpc.response.metadata`. | string[] | Deprecated, use `rpc.response.metadata` instead. | `["attribute_value"]` | | `rpc.grpc.request.metadata.` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)
Replaced by `rpc.request.metadata`. | string[] | Deprecated, use `rpc.request.metadata` instead. | `["1.2.3.4", "1.2.3.5"]` | | `rpc.grpc.response.metadata.` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)
Replaced by `rpc.response.metadata`. | string[] | Deprecated, use `rpc.response.metadata` instead. | `["attribute_value"]` | -| `rpc.grpc.status_code` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)
Use string representation of the gRPC status code on the `rpc.response.status_code` attribute. | int | Deprecated, use string representation on the `rpc.response.status_code` attribute instead. | `0`; `1`; `2` | -| `rpc.jsonrpc.error_code` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)
Use string representation of the error code on the `rpc.response.status_code` attribute. | int | Deprecated, use string representation on the `rpc.response.status_code` attribute instead. | `-32700`; `100` | +| `rpc.grpc.status_code` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)
Use string representation of the gRPC status code on the `rpc.status_code` attribute. | int | Deprecated, use string representation on the `rpc.status_code` attribute instead. | `0`; `1`; `2` | +| `rpc.jsonrpc.error_code` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)
Use string representation of the error code on the `rpc.status_code` attribute. | int | Deprecated, use string representation on the `rpc.status_code` attribute instead. | `-32700`; `100` | | `rpc.jsonrpc.error_message` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)
Use the span status description when reporting JSON-RPC spans. | string | Deprecated, use the span status description when reporting JSON-RPC spans. | `Parse error`; `User already exists` | | `rpc.jsonrpc.request_id` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)
Replaced by `jsonrpc.request.id`. | string | Deprecated, use `jsonrpc.request.id` instead. | `10`; `request-7`; `` | | `rpc.jsonrpc.version` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)
Replaced by `jsonrpc.protocol.version`. | string | Deprecated, use `jsonrpc.protocol.version` instead. | `2.0`; `1.0` | @@ -99,6 +99,7 @@ Deprecated rpc message attributes. | `rpc.message.id` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)
Deprecated, no replacement at this time. | int | MUST be calculated as two different counters starting from `1` one for sent messages and one for received message. [6] | | | `rpc.message.type` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)
Deprecated, no replacement at this time. | string | Whether this is a received or sent message. | `SENT`; `RECEIVED` | | `rpc.message.uncompressed_size` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)
Deprecated, no replacement at this time. | int | Uncompressed size of the message in bytes. | | +| `rpc.response.status_code` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)
Replaced by `rpc.status_code`. | string | Deprecated, use `rpc.status_code` instead. | `OK`; `DEADLINE_EXCEEDED`; `-32602` | | `rpc.service` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)
Value should be included in `rpc.method` which is expected to be a fully-qualified name. | string | Deprecated, use fully-qualified `rpc.method` instead. | `myservice.EchoService` | | `rpc.system` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)
Replaced by `rpc.system.name`. | string | Deprecated, use `rpc.system.name` attribute instead. | `grpc`; `java_rmi`; `dotnet_wcf` | diff --git a/docs/rpc/connect-rpc.md b/docs/rpc/connect-rpc.md index 7a78ca1487..022d0523a7 100644 --- a/docs/rpc/connect-rpc.md +++ b/docs/rpc/connect-rpc.md @@ -47,7 +47,7 @@ document for details on how to record span status. | [`error.type`](/docs/registry/attributes/error.md) | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | `Conditionally Required` If and only if the operation failed. | string | Describes a class of error the operation ended with. [2] | `DEADLINE_EXCEEDED`; `java.net.UnknownHostException`; `-32602` | | [`rpc.method`](/docs/registry/attributes/rpc.md) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Conditionally Required` if available. | string | The fully-qualified logical name of the method from the RPC interface perspective. [3] | `com.example.ExampleService/exampleMethod`; `EchoService/Echo`; `_OTHER` | | [`rpc.method_original`](/docs/registry/attributes/rpc.md) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Conditionally Required` If and only if it's different than `rpc.method`. | string | The original name of the method used by the client. | `com.myservice.EchoService/catchAll`; `com.myservice.EchoService/unknownMethod`; `InvalidMethod` | -| [`rpc.response.status_code`](/docs/registry/attributes/rpc.md) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Conditionally Required` if available. | string | The [error code](https://connectrpc.com//docs/protocol/#error-codes) of the Connect response. [4] | `OK`; `DEADLINE_EXCEEDED`; `-32602` | +| [`rpc.status_code`](/docs/registry/attributes/rpc.md) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Conditionally Required` if available. | string | The [error code](https://connectrpc.com//docs/protocol/#error-codes) of the Connect response. [4] | `OK`; `DEADLINE_EXCEEDED`; `-32602` | | [`server.port`](/docs/registry/attributes/server.md) | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | `Conditionally Required` if available. | int | Server port number. [5] | `80`; `8080`; `443` | | [`network.peer.address`](/docs/registry/attributes/network.md) | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | `Recommended` | string | Peer address of the network connection - IP address or UNIX domain socket name. [6] | `10.1.2.80`; `/tmp/my.sock` | | [`network.peer.port`](/docs/registry/attributes/network.md) | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | `Recommended` If `network.peer.address` is set. | int | Peer port number of the network connection. | `65123` | @@ -62,7 +62,7 @@ or a component-specific, low cardinality error identifier. If a response status code is returned and status indicates an error, `error.type` SHOULD be set to that status code. Check system-specific conventions -for the details on which values of `rpc.response.status_code` are considered errors. +for the details on which values of `rpc.status_code` are considered errors. The `error.type` value SHOULD be predictable and SHOULD have low cardinality. Instrumentations SHOULD document the list of errors they report. @@ -94,7 +94,7 @@ The `code.function.name` attribute may be used to record the fully-qualified method actually executing the call on the server side, or the RPC client stub method on the client side. -**[4] `rpc.response.status_code`:** All status codes except `OK` SHOULD be considered errors. +**[4] `rpc.status_code`:** All status codes except `OK` SHOULD be considered errors. **[5] `server.port`:** When observed from the client side, and when communicating through an intermediary, `server.port` SHOULD represent the server port behind any intermediaries, for example proxies, if it's available. @@ -158,7 +158,7 @@ document for details on how to record span status. | [`error.type`](/docs/registry/attributes/error.md) | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | `Conditionally Required` If and only if the operation failed. | string | Describes a class of error the operation ended with. [1] | `DEADLINE_EXCEEDED`; `java.net.UnknownHostException`; `-32602` | | [`rpc.method`](/docs/registry/attributes/rpc.md) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Conditionally Required` if available. | string | The fully-qualified logical name of the method from the RPC interface perspective. [2] | `com.example.ExampleService/exampleMethod`; `EchoService/Echo`; `_OTHER` | | [`rpc.method_original`](/docs/registry/attributes/rpc.md) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Conditionally Required` If and only if it's different than `rpc.method`. | string | The original name of the method used by the client. | `com.myservice.EchoService/catchAll`; `com.myservice.EchoService/unknownMethod`; `InvalidMethod` | -| [`rpc.response.status_code`](/docs/registry/attributes/rpc.md) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Conditionally Required` if available. | string | The [error code](https://connectrpc.com/docs/protocol/#error-codes) of the Connect response. [3] | `OK`; `DEADLINE_EXCEEDED`; `-32602` | +| [`rpc.status_code`](/docs/registry/attributes/rpc.md) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Conditionally Required` if available. | string | The [error code](https://connectrpc.com/docs/protocol/#error-codes) of the Connect response. [3] | `OK`; `DEADLINE_EXCEEDED`; `-32602` | | [`server.address`](/docs/registry/attributes/server.md) | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | `Conditionally Required` If available. | string | A string identifying a group of RPC server instances request is sent to. [4] | `example.com`; `10.1.2.80`; `/tmp/my.sock` | | [`server.port`](/docs/registry/attributes/server.md) | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | `Conditionally Required` if applicable and if `server.address` is set. | int | Server port number. [5] | `80`; `8080`; `443` | | [`network.peer.address`](/docs/registry/attributes/network.md) | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | `Recommended` | string | Peer address of the network connection - IP address or UNIX domain socket name. [6] | `10.1.2.80`; `/tmp/my.sock` | @@ -172,7 +172,7 @@ or a component-specific, low cardinality error identifier. If a response status code is returned and status indicates an error, `error.type` SHOULD be set to that status code. Check system-specific conventions -for the details on which values of `rpc.response.status_code` are considered errors. +for the details on which values of `rpc.status_code` are considered errors. The `error.type` value SHOULD be predictable and SHOULD have low cardinality. Instrumentations SHOULD document the list of errors they report. @@ -204,7 +204,7 @@ The `code.function.name` attribute may be used to record the fully-qualified method actually executing the call on the server side, or the RPC client stub method on the client side. -**[3] `rpc.response.status_code`:** The following error codes SHOULD be considered errors: +**[3] `rpc.status_code`:** The following error codes SHOULD be considered errors: - `unknown` - `deadline_exceeded` diff --git a/docs/rpc/dubbo.md b/docs/rpc/dubbo.md index f8d3c1745c..e0e24bfa87 100644 --- a/docs/rpc/dubbo.md +++ b/docs/rpc/dubbo.md @@ -37,7 +37,7 @@ This span represents an outgoing Remote Procedure Call (RPC). **Span kind** MUST be `CLIENT`. **Span status** Refer to the [Recording Errors](/docs/general/recording-errors.md) -document for details on how to record span status. See also `rpc.response.status_code` attribute +document for details on how to record span status. See also `rpc.status_code` attribute for the details on which values classify as errors. **Attributes:** @@ -45,7 +45,7 @@ for the details on which values classify as errors. | Key | Stability | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Value Type | Description | Example Values | | --- | --- | --- | --- | --- | --- | | [`rpc.method`](/docs/registry/attributes/rpc.md) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Required` | string | The fully-qualified logical name of the method from the RPC interface perspective. [1] | `com.example.ExampleService/exampleMethod`; `EchoService/Echo`; `_OTHER` | -| [`rpc.response.status_code`](/docs/registry/attributes/rpc.md) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Required` | string | The string representation of the Dubbo response status code returned by the server or generated by the client. [2] | `OK`; `DEADLINE_EXCEEDED`; `SERVER_ERROR` | +| [`rpc.status_code`](/docs/registry/attributes/rpc.md) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Required` | string | The string representation of the Dubbo response status code returned by the server or generated by the client. [2] | `OK`; `DEADLINE_EXCEEDED`; `SERVER_ERROR` | | [`error.type`](/docs/registry/attributes/error.md) | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | `Conditionally Required` If and only if the operation failed. | string | Describes a class of error the operation ended with. [3] | `DEADLINE_EXCEEDED`; `java.net.UnknownHostException`; `-32602` | | [`rpc.method_original`](/docs/registry/attributes/rpc.md) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Conditionally Required` If and only if it's different than `rpc.method`. | string | The original name of the method used by the client. | `com.myservice.EchoService/catchAll`; `com.myservice.EchoService/unknownMethod`; `InvalidMethod` | | [`server.address`](/docs/registry/attributes/server.md) | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | `Conditionally Required` If available. | string | A string identifying a group of RPC server instances request is sent to. [4] | `192.168.1.100`; `api.example.com`; `zookeeper://127.0.0.1:2181/com.example.HelloService:1.0.0:testGroup` | @@ -79,7 +79,7 @@ The `code.function.name` attribute may be used to record the fully-qualified method actually executing the call on the server side, or the RPC client stub method on the client side. -**[2] `rpc.response.status_code`:** All status codes except `OK` SHOULD be considered errors. +**[2] `rpc.status_code`:** All status codes except `OK` SHOULD be considered errors. Status codes reference: @@ -92,7 +92,7 @@ or a component-specific, low cardinality error identifier. If a response status code is returned and status indicates an error, `error.type` SHOULD be set to that status code. Check system-specific conventions -for the details on which values of `rpc.response.status_code` are considered errors. +for the details on which values of `rpc.status_code` are considered errors. The `error.type` value SHOULD be predictable and SHOULD have low cardinality. Instrumentations SHOULD document the list of errors they report. @@ -214,14 +214,14 @@ This span represents an incoming Remote Procedure Call (RPC). **Span kind** MUST be `SERVER`. **Span status** Refer to the [Recording Errors](/docs/general/recording-errors.md) -document for details on how to record span status. See also `rpc.response.status_code` attribute +document for details on how to record span status. See also `rpc.status_code` attribute for the details on which values classify as errors. **Attributes:** | Key | Stability | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Value Type | Description | Example Values | | --- | --- | --- | --- | --- | --- | -| [`rpc.response.status_code`](/docs/registry/attributes/rpc.md) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Required` | string | The string representation of the Dubbo response status code returned by the server. [1] | `OK`; `SERVER_ERROR`; `SERVER_THREADPOOL_EXHAUSTED_ERROR` | +| [`rpc.status_code`](/docs/registry/attributes/rpc.md) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Required` | string | The string representation of the Dubbo response status code returned by the server. [1] | `OK`; `SERVER_ERROR`; `SERVER_THREADPOOL_EXHAUSTED_ERROR` | | [`error.type`](/docs/registry/attributes/error.md) | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | `Conditionally Required` If and only if the operation failed. | string | Describes a class of error the operation ended with. [2] | `DEADLINE_EXCEEDED`; `java.net.UnknownHostException`; `-32602` | | [`rpc.method`](/docs/registry/attributes/rpc.md) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Conditionally Required` if available. | string | The fully-qualified logical name of the method from the RPC interface perspective. [3] | `com.example.ExampleService/exampleMethod`; `EchoService/Echo`; `_OTHER` | | [`rpc.method_original`](/docs/registry/attributes/rpc.md) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Conditionally Required` If and only if it's different than `rpc.method`. | string | The original name of the method used by the client. | `com.myservice.EchoService/catchAll`; `com.myservice.EchoService/unknownMethod`; `InvalidMethod` | @@ -232,7 +232,7 @@ for the details on which values classify as errors. | [`rpc.request.metadata.`](/docs/registry/attributes/rpc.md) | ![Development](https://img.shields.io/badge/-development-blue) | `Opt-In` | string[] | RPC request metadata, `` being the normalized RPC metadata key (lowercase), the value being the metadata values. [8] | `["1.2.3.4", "1.2.3.5"]` | | [`rpc.response.metadata.`](/docs/registry/attributes/rpc.md) | ![Development](https://img.shields.io/badge/-development-blue) | `Opt-In` | string[] | RPC response metadata, `` being the normalized RPC metadata key (lowercase), the value being the metadata values. [9] | `["attribute_value"]` | -**[1] `rpc.response.status_code`:** For Dubbo2, the following status codes SHOULD be considered errors: +**[1] `rpc.status_code`:** For Dubbo2, the following status codes SHOULD be considered errors: - `SERVER_ERROR` - `SERVER_THREADPOOL_EXHAUSTED_ERROR` @@ -259,7 +259,7 @@ or a component-specific, low cardinality error identifier. If a response status code is returned and status indicates an error, `error.type` SHOULD be set to that status code. Check system-specific conventions -for the details on which values of `rpc.response.status_code` are considered errors. +for the details on which values of `rpc.status_code` are considered errors. The `error.type` value SHOULD be predictable and SHOULD have low cardinality. Instrumentations SHOULD document the list of errors they report. diff --git a/docs/rpc/grpc.md b/docs/rpc/grpc.md index 1b9f979492..ef8d635927 100644 --- a/docs/rpc/grpc.md +++ b/docs/rpc/grpc.md @@ -45,7 +45,7 @@ This span represents an outgoing Remote Procedure Call (RPC). **Span kind** MUST be `CLIENT`. **Span status**: refer to the [Recording Errors](/docs/general/recording-errors.md) -document for details on how to record span status. See also `rpc.response.status_code` attribute +document for details on how to record span status. See also `rpc.status_code` attribute for the details on which values classify as errors. **Attributes:** @@ -53,7 +53,7 @@ for the details on which values classify as errors. | Key | Stability | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Value Type | Description | Example Values | | --- | --- | --- | --- | --- | --- | | [`rpc.method`](/docs/registry/attributes/rpc.md) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Required` | string | The fully-qualified logical name of the method from the RPC interface perspective. [1] | `com.example.ExampleService/exampleMethod`; `EchoService/Echo`; `_OTHER` | -| [`rpc.response.status_code`](/docs/registry/attributes/rpc.md) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Required` | string | The string representation of the [status code](https://github.com/grpc/grpc/blob/v1.75.0/doc/statuscodes.md) returned by the server or generated by the client. [2] | `OK`; `DEADLINE_EXCEEDED`; `-32602` | +| [`rpc.status_code`](/docs/registry/attributes/rpc.md) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Required` | string | The string representation of the [status code](https://github.com/grpc/grpc/blob/v1.75.0/doc/statuscodes.md) returned by the server or generated by the client. [2] | `OK`; `DEADLINE_EXCEEDED`; `-32602` | | [`server.address`](/docs/registry/attributes/server.md) | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | `Required` | string | A string identifying a group of RPC server instances request is sent to. [3] | `example.com`; `10.1.2.80`; `/tmp/my.sock` | | [`error.type`](/docs/registry/attributes/error.md) | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | `Conditionally Required` If and only if the operation failed. | string | Describes a class of error the operation ended with. [4] | `DEADLINE_EXCEEDED`; `java.net.UnknownHostException`; `-32602` | | [`rpc.method_original`](/docs/registry/attributes/rpc.md) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Conditionally Required` If and only if it's different than `rpc.method`. | string | The original name of the method used by the client. | `com.myservice.EchoService/catchAll`; `com.myservice.EchoService/unknownMethod`; `InvalidMethod` | @@ -87,7 +87,7 @@ The `code.function.name` attribute may be used to record the fully-qualified method actually executing the call on the server side, or the RPC client stub method on the client side. -**[2] `rpc.response.status_code`:** All status codes except `OK` SHOULD be considered errors. +**[2] `rpc.status_code`:** All status codes except `OK` SHOULD be considered errors. **[3] `server.address`:** Instrumentations SHOULD populate `server.address` (along with `server.port`) based on the configuration used when creating the gRPC channel and @@ -132,7 +132,7 @@ or a component-specific, low cardinality error identifier. If a response status code is returned and status indicates an error, `error.type` SHOULD be set to that status code. Check system-specific conventions -for the details on which values of `rpc.response.status_code` are considered errors. +for the details on which values of `rpc.status_code` are considered errors. The `error.type` value SHOULD be predictable and SHOULD have low cardinality. Instrumentations SHOULD document the list of errors they report. @@ -195,14 +195,14 @@ This span represents an incoming Remote Procedure Call (RPC). **Span kind** MUST be `SERVER`. **Span status**: refer to the [Recording Errors](/docs/general/recording-errors.md) -document for details on how to record span status. See also `rpc.response.status_code` attribute +document for details on how to record span status. See also `rpc.status_code` attribute for the details on which values classify as errors. **Attributes:** | Key | Stability | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Value Type | Description | Example Values | | --- | --- | --- | --- | --- | --- | -| [`rpc.response.status_code`](/docs/registry/attributes/rpc.md) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Required` | string | The string representation of the [status code](https://github.com/grpc/grpc/blob/v1.75.0/doc/statuscodes.md) returned by the server. [1] | `OK`; `DEADLINE_EXCEEDED`; `-32602` | +| [`rpc.status_code`](/docs/registry/attributes/rpc.md) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Required` | string | The string representation of the [status code](https://github.com/grpc/grpc/blob/v1.75.0/doc/statuscodes.md) returned by the server. [1] | `OK`; `DEADLINE_EXCEEDED`; `-32602` | | [`error.type`](/docs/registry/attributes/error.md) | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | `Conditionally Required` If and only if the operation failed. | string | Describes a class of error the operation ended with. [2] | `DEADLINE_EXCEEDED`; `java.net.UnknownHostException`; `-32602` | | [`rpc.method`](/docs/registry/attributes/rpc.md) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Conditionally Required` if available. | string | The fully-qualified logical name of the method from the RPC interface perspective. [3] | `com.example.ExampleService/exampleMethod`; `EchoService/Echo`; `_OTHER` | | [`rpc.method_original`](/docs/registry/attributes/rpc.md) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Conditionally Required` If and only if it's different than `rpc.method`. | string | The original name of the method used by the client. | `com.myservice.EchoService/catchAll`; `com.myservice.EchoService/unknownMethod`; `InvalidMethod` | @@ -213,7 +213,7 @@ for the details on which values classify as errors. | [`rpc.request.metadata.`](/docs/registry/attributes/rpc.md) | ![Development](https://img.shields.io/badge/-development-blue) | `Opt-In` | string[] | RPC request metadata, `` being the normalized RPC metadata key (lowercase), the value being the metadata values. [7] | `["1.2.3.4", "1.2.3.5"]` | | [`rpc.response.metadata.`](/docs/registry/attributes/rpc.md) | ![Development](https://img.shields.io/badge/-development-blue) | `Opt-In` | string[] | RPC response metadata, `` being the normalized RPC metadata key (lowercase), the value being the metadata values. [8] | `["attribute_value"]` | -**[1] `rpc.response.status_code`:** The following status codes SHOULD be considered errors: +**[1] `rpc.status_code`:** The following status codes SHOULD be considered errors: - `UNKNOWN` - `DEADLINE_EXCEEDED` @@ -228,7 +228,7 @@ or a component-specific, low cardinality error identifier. If a response status code is returned and status indicates an error, `error.type` SHOULD be set to that status code. Check system-specific conventions -for the details on which values of `rpc.response.status_code` are considered errors. +for the details on which values of `rpc.status_code` are considered errors. The `error.type` value SHOULD be predictable and SHOULD have low cardinality. Instrumentations SHOULD document the list of errors they report. diff --git a/docs/rpc/json-rpc.md b/docs/rpc/json-rpc.md index c7e6886c1a..3ebee1be3d 100644 --- a/docs/rpc/json-rpc.md +++ b/docs/rpc/json-rpc.md @@ -48,7 +48,7 @@ are considered errors. | [`error.type`](/docs/registry/attributes/error.md) | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | `Conditionally Required` If and only if the operation failed. | string | Describes a class of error the operation ended with. [1] | `DEADLINE_EXCEEDED`; `java.net.UnknownHostException`; `-32602` | | [`jsonrpc.protocol.version`](/docs/registry/attributes/jsonrpc.md) | ![Development](https://img.shields.io/badge/-development-blue) | `Conditionally Required` If other than the default version (`1.0`) | string | Protocol version, as specified in the `jsonrpc` property of the request and its corresponding response. | `2.0`; `1.0` | | [`rpc.method_original`](/docs/registry/attributes/rpc.md) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Conditionally Required` If and only if it's different than `rpc.method`. | string | The original name of the method used by the client. | `com.myservice.EchoService/catchAll`; `com.myservice.EchoService/unknownMethod`; `InvalidMethod` | -| [`rpc.response.status_code`](/docs/registry/attributes/rpc.md) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Conditionally Required` when available | string | The [`error.code`](https://www.jsonrpc.org/specification#error_object) property of response if it is an error response recorded as a string. [2] | `OK`; `DEADLINE_EXCEEDED`; `-32602` | +| [`rpc.status_code`](/docs/registry/attributes/rpc.md) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Conditionally Required` when available | string | The [`error.code`](https://www.jsonrpc.org/specification#error_object) property of response if it is an error response recorded as a string. [2] | `OK`; `DEADLINE_EXCEEDED`; `-32602` | | [`server.port`](/docs/registry/attributes/server.md) | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | `Conditionally Required` if applicable and if `server.address` is set. | int | Server port number. [3] | `80`; `8080`; `443` | | [`jsonrpc.request.id`](/docs/registry/attributes/jsonrpc.md) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | A string representation of the `id` property of the request and its corresponding response. [4] | `10`; `request-7` | | [`network.peer.address`](/docs/registry/attributes/network.md) | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | `Recommended` | string | Peer address of the network connection - IP address or UNIX domain socket name. [5] | `10.1.2.80`; `/tmp/my.sock` | @@ -62,7 +62,7 @@ or a component-specific, low cardinality error identifier. If a response status code is returned and status indicates an error, `error.type` SHOULD be set to that status code. Check system-specific conventions -for the details on which values of `rpc.response.status_code` are considered errors. +for the details on which values of `rpc.status_code` are considered errors. The `error.type` value SHOULD be predictable and SHOULD have low cardinality. Instrumentations SHOULD document the list of errors they report. @@ -70,7 +70,7 @@ Instrumentations SHOULD document the list of errors they report. If the request has completed successfully, instrumentations SHOULD NOT set `error.type`. -**[2] `rpc.response.status_code`:** All JSON RPC error codes SHOULD be considered errors. +**[2] `rpc.status_code`:** All JSON RPC error codes SHOULD be considered errors. **[3] `server.port`:** When observed from the client side, and when communicating through an intermediary, `server.port` SHOULD represent the server port behind any intermediaries, for example proxies, if it's available. @@ -132,7 +132,7 @@ are considered errors. | [`error.type`](/docs/registry/attributes/error.md) | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | `Conditionally Required` If and only if the operation failed. | string | Describes a class of error the operation ended with. [1] | `DEADLINE_EXCEEDED`; `java.net.UnknownHostException`; `-32602` | | [`jsonrpc.protocol.version`](/docs/registry/attributes/jsonrpc.md) | ![Development](https://img.shields.io/badge/-development-blue) | `Conditionally Required` If other than the default version (`1.0`) | string | Protocol version, as specified in the `jsonrpc` property of the request and its corresponding response. | `2.0`; `1.0` | | [`rpc.method_original`](/docs/registry/attributes/rpc.md) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Conditionally Required` If and only if it's different than `rpc.method`. | string | The original name of the method used by the client. | `com.myservice.EchoService/catchAll`; `com.myservice.EchoService/unknownMethod`; `InvalidMethod` | -| [`rpc.response.status_code`](/docs/registry/attributes/rpc.md) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Conditionally Required` when available | string | The [`error.code`](https://www.jsonrpc.org/specification#error_object) property of response recorded as a string. [2] | `OK`; `DEADLINE_EXCEEDED`; `-32602` | +| [`rpc.status_code`](/docs/registry/attributes/rpc.md) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Conditionally Required` when available | string | The [`error.code`](https://www.jsonrpc.org/specification#error_object) property of response recorded as a string. [2] | `OK`; `DEADLINE_EXCEEDED`; `-32602` | | [`server.address`](/docs/registry/attributes/server.md) | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | `Conditionally Required` If available. | string | A string identifying a group of RPC server instances request is sent to. [3] | `example.com`; `10.1.2.80`; `/tmp/my.sock` | | [`server.port`](/docs/registry/attributes/server.md) | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | `Conditionally Required` if applicable and if `server.address` is set. | int | Server port number. [4] | `80`; `8080`; `443` | | [`jsonrpc.request.id`](/docs/registry/attributes/jsonrpc.md) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | A string representation of the `id` property of the request and its corresponding response. [5] | `10`; `request-7` | @@ -146,7 +146,7 @@ or a component-specific, low cardinality error identifier. If a response status code is returned and status indicates an error, `error.type` SHOULD be set to that status code. Check system-specific conventions -for the details on which values of `rpc.response.status_code` are considered errors. +for the details on which values of `rpc.status_code` are considered errors. The `error.type` value SHOULD be predictable and SHOULD have low cardinality. Instrumentations SHOULD document the list of errors they report. @@ -154,7 +154,7 @@ Instrumentations SHOULD document the list of errors they report. If the request has completed successfully, instrumentations SHOULD NOT set `error.type`. -**[2] `rpc.response.status_code`:** All JSON RPC error codes SHOULD be considered errors. +**[2] `rpc.status_code`:** All JSON RPC error codes SHOULD be considered errors. **[3] `server.address`:** May contain a DNS name, an endpoint and path in the service registry, local socket name or an IP address. Semantic conventions for individual RPC systems SHOULD document how to populate this attribute. diff --git a/docs/rpc/rpc-metrics.md b/docs/rpc/rpc-metrics.md index 4d002ee4eb..13cd97b6a2 100644 --- a/docs/rpc/rpc-metrics.md +++ b/docs/rpc/rpc-metrics.md @@ -77,7 +77,7 @@ SHOULD be the same as the RPC server span duration. | [`rpc.system.name`](/docs/registry/attributes/rpc.md) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Required` | string | The Remote Procedure Call (RPC) system. [1] | `grpc`; `dubbo`; `connectrpc` | | [`error.type`](/docs/registry/attributes/error.md) | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | `Conditionally Required` If and only if the operation failed. | string | Describes a class of error the operation ended with. [2] | `DEADLINE_EXCEEDED`; `java.net.UnknownHostException`; `-32602` | | [`rpc.method`](/docs/registry/attributes/rpc.md) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Conditionally Required` if available. | string | The fully-qualified logical name of the method from the RPC interface perspective. [3] | `com.example.ExampleService/exampleMethod`; `EchoService/Echo`; `_OTHER` | -| [`rpc.response.status_code`](/docs/registry/attributes/rpc.md) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Conditionally Required` if available. | string | Status code of the RPC returned by the RPC server or generated by the client [4] | `OK`; `DEADLINE_EXCEEDED`; `-32602` | +| [`rpc.status_code`](/docs/registry/attributes/rpc.md) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Conditionally Required` if available. | string | Status code of the RPC returned by the RPC server or generated by the client [4] | `OK`; `DEADLINE_EXCEEDED`; `-32602` | | [`server.address`](/docs/registry/attributes/server.md) | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | `Opt-In` | string | A string identifying a group of RPC server instances request is sent to. | `example.com`; `10.1.2.80`; `/tmp/my.sock` | | [`server.port`](/docs/registry/attributes/server.md) | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | `Opt-In` | int | Server port number. | `80`; `8080`; `443` | @@ -89,7 +89,7 @@ or a component-specific, low cardinality error identifier. If a response status code is returned and status indicates an error, `error.type` SHOULD be set to that status code. Check system-specific conventions -for the details on which values of `rpc.response.status_code` are considered errors. +for the details on which values of `rpc.status_code` are considered errors. The `error.type` value SHOULD be predictable and SHOULD have low cardinality. Instrumentations SHOULD document the list of errors they report. @@ -121,8 +121,8 @@ The `code.function.name` attribute may be used to record the fully-qualified method actually executing the call on the server side, or the RPC client stub method on the client side. -**[4] `rpc.response.status_code`:** Usually it represents an error code, but may also represent partial success, warning, or differentiate between various types of successful outcomes. -Semantic conventions for individual RPC frameworks SHOULD document what `rpc.response.status_code` means in the context of that system and which values are considered to represent errors. +**[4] `rpc.status_code`:** Usually it represents an error code, but may also represent partial success, warning, or differentiate between various types of successful outcomes. +Semantic conventions for individual RPC frameworks SHOULD document what `rpc.status_code` means in the context of that system and which values are considered to represent errors. --- @@ -176,7 +176,7 @@ SHOULD be the same as the RPC client span duration. | [`rpc.system.name`](/docs/registry/attributes/rpc.md) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Required` | string | The Remote Procedure Call (RPC) system. [1] | `grpc`; `dubbo`; `connectrpc` | | [`error.type`](/docs/registry/attributes/error.md) | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | `Conditionally Required` If and only if the operation failed. | string | Describes a class of error the operation ended with. [2] | `DEADLINE_EXCEEDED`; `java.net.UnknownHostException`; `-32602` | | [`rpc.method`](/docs/registry/attributes/rpc.md) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Conditionally Required` if available. | string | The fully-qualified logical name of the method from the RPC interface perspective. [3] | `com.example.ExampleService/exampleMethod`; `EchoService/Echo`; `_OTHER` | -| [`rpc.response.status_code`](/docs/registry/attributes/rpc.md) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Conditionally Required` if available. | string | Status code of the RPC returned by the RPC server or generated by the client [4] | `OK`; `DEADLINE_EXCEEDED`; `-32602` | +| [`rpc.status_code`](/docs/registry/attributes/rpc.md) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Conditionally Required` if available. | string | Status code of the RPC returned by the RPC server or generated by the client [4] | `OK`; `DEADLINE_EXCEEDED`; `-32602` | | [`server.address`](/docs/registry/attributes/server.md) | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | `Conditionally Required` If available. | string | A string identifying a group of RPC server instances request is sent to. [5] | `example.com`; `10.1.2.80`; `/tmp/my.sock` | | [`server.port`](/docs/registry/attributes/server.md) | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | `Conditionally Required` if applicable and if `server.address` is set. | int | Server port number. [6] | `80`; `8080`; `443` | @@ -188,7 +188,7 @@ or a component-specific, low cardinality error identifier. If a response status code is returned and status indicates an error, `error.type` SHOULD be set to that status code. Check system-specific conventions -for the details on which values of `rpc.response.status_code` are considered errors. +for the details on which values of `rpc.status_code` are considered errors. The `error.type` value SHOULD be predictable and SHOULD have low cardinality. Instrumentations SHOULD document the list of errors they report. @@ -220,8 +220,8 @@ The `code.function.name` attribute may be used to record the fully-qualified method actually executing the call on the server side, or the RPC client stub method on the client side. -**[4] `rpc.response.status_code`:** Usually it represents an error code, but may also represent partial success, warning, or differentiate between various types of successful outcomes. -Semantic conventions for individual RPC frameworks SHOULD document what `rpc.response.status_code` means in the context of that system and which values are considered to represent errors. +**[4] `rpc.status_code`:** Usually it represents an error code, but may also represent partial success, warning, or differentiate between various types of successful outcomes. +Semantic conventions for individual RPC frameworks SHOULD document what `rpc.status_code` means in the context of that system and which values are considered to represent errors. **[5] `server.address`:** May contain a DNS name, an endpoint and path in the service registry, local socket name or an IP address. Semantic conventions for individual RPC systems SHOULD document how to populate this attribute. diff --git a/docs/rpc/rpc-spans.md b/docs/rpc/rpc-spans.md index 4179c27889..8095f96b9f 100644 --- a/docs/rpc/rpc-spans.md +++ b/docs/rpc/rpc-spans.md @@ -91,7 +91,7 @@ document for details on how to record span status. | [`error.type`](/docs/registry/attributes/error.md) | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | `Conditionally Required` If and only if the operation failed. | string | Describes a class of error the operation ended with. [2] | `DEADLINE_EXCEEDED`; `java.net.UnknownHostException`; `-32602` | | [`rpc.method`](/docs/registry/attributes/rpc.md) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Conditionally Required` if available. | string | The fully-qualified logical name of the method from the RPC interface perspective. [3] | `com.example.ExampleService/exampleMethod`; `EchoService/Echo`; `_OTHER` | | [`rpc.method_original`](/docs/registry/attributes/rpc.md) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Conditionally Required` If and only if it's different than `rpc.method`. | string | The original name of the method used by the client. | `com.myservice.EchoService/catchAll`; `com.myservice.EchoService/unknownMethod`; `InvalidMethod` | -| [`rpc.response.status_code`](/docs/registry/attributes/rpc.md) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Conditionally Required` if available. | string | Status code of the RPC returned by the RPC server or generated by the client [4] | `OK`; `DEADLINE_EXCEEDED`; `-32602` | +| [`rpc.status_code`](/docs/registry/attributes/rpc.md) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Conditionally Required` if available. | string | Status code of the RPC returned by the RPC server or generated by the client [4] | `OK`; `DEADLINE_EXCEEDED`; `-32602` | | [`server.address`](/docs/registry/attributes/server.md) | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | `Conditionally Required` If available. | string | A string identifying a group of RPC server instances request is sent to. [5] | `example.com`; `10.1.2.80`; `/tmp/my.sock` | | [`server.port`](/docs/registry/attributes/server.md) | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | `Conditionally Required` if applicable and if `server.address` is set. | int | Server port number. [6] | `80`; `8080`; `443` | | [`network.peer.address`](/docs/registry/attributes/network.md) | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | `Recommended` | string | Peer address of the network connection - IP address or UNIX domain socket name. [7] | `10.1.2.80`; `/tmp/my.sock` | @@ -105,7 +105,7 @@ or a component-specific, low cardinality error identifier. If a response status code is returned and status indicates an error, `error.type` SHOULD be set to that status code. Check system-specific conventions -for the details on which values of `rpc.response.status_code` are considered errors. +for the details on which values of `rpc.status_code` are considered errors. The `error.type` value SHOULD be predictable and SHOULD have low cardinality. Instrumentations SHOULD document the list of errors they report. @@ -137,8 +137,8 @@ The `code.function.name` attribute may be used to record the fully-qualified method actually executing the call on the server side, or the RPC client stub method on the client side. -**[4] `rpc.response.status_code`:** Usually it represents an error code, but may also represent partial success, warning, or differentiate between various types of successful outcomes. -Semantic conventions for individual RPC frameworks SHOULD document what `rpc.response.status_code` means in the context of that system and which values are considered to represent errors. +**[4] `rpc.status_code`:** Usually it represents an error code, but may also represent partial success, warning, or differentiate between various types of successful outcomes. +Semantic conventions for individual RPC frameworks SHOULD document what `rpc.status_code` means in the context of that system and which values are considered to represent errors. **[5] `server.address`:** May contain a DNS name, an endpoint and path in the service registry, local socket name or an IP address. Semantic conventions for individual RPC systems SHOULD document how to populate this attribute. @@ -212,7 +212,7 @@ document for details on how to record span status. | [`error.type`](/docs/registry/attributes/error.md) | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | `Conditionally Required` If and only if the operation failed. | string | Describes a class of error the operation ended with. [2] | `DEADLINE_EXCEEDED`; `java.net.UnknownHostException`; `-32602` | | [`rpc.method`](/docs/registry/attributes/rpc.md) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Conditionally Required` if available. | string | The fully-qualified logical name of the method from the RPC interface perspective. [3] | `com.example.ExampleService/exampleMethod`; `EchoService/Echo`; `_OTHER` | | [`rpc.method_original`](/docs/registry/attributes/rpc.md) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Conditionally Required` If and only if it's different than `rpc.method`. | string | The original name of the method used by the client. | `com.myservice.EchoService/catchAll`; `com.myservice.EchoService/unknownMethod`; `InvalidMethod` | -| [`rpc.response.status_code`](/docs/registry/attributes/rpc.md) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Conditionally Required` if available. | string | Status code of the RPC returned by the RPC server or generated by the client [4] | `OK`; `DEADLINE_EXCEEDED`; `-32602` | +| [`rpc.status_code`](/docs/registry/attributes/rpc.md) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Conditionally Required` if available. | string | Status code of the RPC returned by the RPC server or generated by the client [4] | `OK`; `DEADLINE_EXCEEDED`; `-32602` | | [`server.address`](/docs/registry/attributes/server.md) | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | `Conditionally Required` If available. | string | A string identifying a group of RPC server instances request is sent to. [5] | `example.com`; `10.1.2.80`; `/tmp/my.sock` | | [`server.port`](/docs/registry/attributes/server.md) | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | `Conditionally Required` if applicable and if `server.address` is set. | int | Server port number. [6] | `80`; `8080`; `443` | | [`network.peer.address`](/docs/registry/attributes/network.md) | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | `Recommended` | string | Peer address of the network connection - IP address or UNIX domain socket name. [7] | `10.1.2.80`; `/tmp/my.sock` | @@ -226,7 +226,7 @@ or a component-specific, low cardinality error identifier. If a response status code is returned and status indicates an error, `error.type` SHOULD be set to that status code. Check system-specific conventions -for the details on which values of `rpc.response.status_code` are considered errors. +for the details on which values of `rpc.status_code` are considered errors. The `error.type` value SHOULD be predictable and SHOULD have low cardinality. Instrumentations SHOULD document the list of errors they report. @@ -258,8 +258,8 @@ The `code.function.name` attribute may be used to record the fully-qualified method actually executing the call on the server side, or the RPC client stub method on the client side. -**[4] `rpc.response.status_code`:** Usually it represents an error code, but may also represent partial success, warning, or differentiate between various types of successful outcomes. -Semantic conventions for individual RPC frameworks SHOULD document what `rpc.response.status_code` means in the context of that system and which values are considered to represent errors. +**[4] `rpc.status_code`:** Usually it represents an error code, but may also represent partial success, warning, or differentiate between various types of successful outcomes. +Semantic conventions for individual RPC frameworks SHOULD document what `rpc.status_code` means in the context of that system and which values are considered to represent errors. **[5] `server.address`:** May contain a DNS name, an endpoint and path in the service registry, local socket name or an IP address. Semantic conventions for individual RPC systems SHOULD document how to populate this attribute. diff --git a/model/mcp/deprecated/common-deprecated.yaml b/model/mcp/deprecated/common-deprecated.yaml index 7593d2240e..2d6c5a3a6e 100644 --- a/model/mcp/deprecated/common-deprecated.yaml +++ b/model/mcp/deprecated/common-deprecated.yaml @@ -48,7 +48,7 @@ groups: - ref: mcp.method.name requirement_level: required - ref: mcp.protocol.version - - ref: rpc.response.status_code + - ref: rpc.status_code brief: The error code from the JSON-RPC response. requirement_level: conditionally_required: If response contains an error code. diff --git a/model/otel/metrics.yaml b/model/otel/metrics.yaml index e1d0c1d944..4916fdde42 100644 --- a/model/otel/metrics.yaml +++ b/model/otel/metrics.yaml @@ -359,7 +359,7 @@ groups: brief: The HTTP status code of the last HTTP request performed in scope of this export call. requirement_level: recommended: when applicable - - ref: rpc.response.status_code + - ref: rpc.status_code brief: The gRPC status code of the last gRPC request performed in scope of this export call. requirement_level: recommended: when applicable diff --git a/model/rpc/common.yaml b/model/rpc/common.yaml index f09b48bcc2..788496a55f 100644 --- a/model/rpc/common.yaml +++ b/model/rpc/common.yaml @@ -22,7 +22,7 @@ groups: - ref: server.port requirement_level: conditionally_required: if applicable and if `server.address` is set. - - ref: rpc.response.status_code + - ref: rpc.status_code requirement_level: conditionally_required: if available. - ref: error.type @@ -36,7 +36,7 @@ groups: If a response status code is returned and status indicates an error, `error.type` SHOULD be set to that status code. Check system-specific conventions - for the details on which values of `rpc.response.status_code` are considered errors. + for the details on which values of `rpc.status_code` are considered errors. The `error.type` value SHOULD be predictable and SHOULD have low cardinality. Instrumentations SHOULD document the list of errors they report. diff --git a/model/rpc/deprecated/registry-deprecated.yaml b/model/rpc/deprecated/registry-deprecated.yaml index 88f251752e..d5af025cd2 100644 --- a/model/rpc/deprecated/registry-deprecated.yaml +++ b/model/rpc/deprecated/registry-deprecated.yaml @@ -75,6 +75,14 @@ groups: deprecated: reason: renamed renamed_to: rpc.response.metadata + - id: rpc.response.status_code + type: string + stability: release_candidate + brief: "Deprecated, use `rpc.status_code` instead." + examples: ["OK", "DEADLINE_EXCEEDED", "-32602"] + deprecated: + reason: renamed + renamed_to: rpc.status_code - id: rpc.grpc.status_code type: members: @@ -147,10 +155,10 @@ groups: stability: development value: 16 stability: development - brief: "Deprecated, use string representation on the `rpc.response.status_code` attribute instead." + brief: "Deprecated, use string representation on the `rpc.status_code` attribute instead." deprecated: reason: uncategorized - note: "Use string representation of the gRPC status code on the `rpc.response.status_code` attribute." + note: "Use string representation of the gRPC status code on the `rpc.status_code` attribute." - id: rpc.connect_rpc.error_code type: members: @@ -203,18 +211,18 @@ groups: value: unauthenticated stability: development stability: development - brief: "Deprecated, use `rpc.response.status_code` attribute instead." + brief: "Deprecated, use `rpc.status_code` attribute instead." deprecated: reason: renamed - renamed_to: rpc.response.status_code + renamed_to: rpc.status_code - id: rpc.jsonrpc.error_code type: int stability: development - brief: "Deprecated, use string representation on the `rpc.response.status_code` attribute instead." + brief: "Deprecated, use string representation on the `rpc.status_code` attribute instead." examples: [-32700, 100] deprecated: reason: uncategorized - note: "Use string representation of the error code on the `rpc.response.status_code` attribute." + note: "Use string representation of the error code on the `rpc.status_code` attribute." - id: rpc.jsonrpc.error_message type: string stability: development diff --git a/model/rpc/registry.yaml b/model/rpc/registry.yaml index 2296b69b9d..9e0384a601 100644 --- a/model/rpc/registry.yaml +++ b/model/rpc/registry.yaml @@ -4,7 +4,7 @@ groups: display_name: Remote Procedure Call (RPC) Attributes brief: 'This document defines attributes for remote procedure calls.' attributes: - - id: rpc.response.status_code + - id: rpc.status_code type: string stability: release_candidate brief: Status code of the RPC returned by the RPC server or generated by the client @@ -13,7 +13,7 @@ groups: warning, or differentiate between various types of successful outcomes. Semantic conventions for individual RPC frameworks SHOULD document what - `rpc.response.status_code` means in the context of that system and which values + `rpc.status_code` means in the context of that system and which values are considered to represent errors. examples: ["OK", "DEADLINE_EXCEEDED", "-32602"] - id: rpc.request.metadata diff --git a/model/rpc/spans.yaml b/model/rpc/spans.yaml index 20194777c3..58386cb48b 100644 --- a/model/rpc/spans.yaml +++ b/model/rpc/spans.yaml @@ -94,7 +94,7 @@ groups: extends: rpc span_kind: client attributes: - - ref: rpc.response.status_code + - ref: rpc.status_code requirement_level: conditionally_required: if available. brief: The [error code](https://connectrpc.com//docs/protocol/#error-codes) of the Connect response. @@ -131,7 +131,7 @@ groups: **Span status**: refer to the [Recording Errors](/docs/general/recording-errors.md) document for details on how to record span status. attributes: - - ref: rpc.response.status_code + - ref: rpc.status_code requirement_level: conditionally_required: if available. brief: The [error code](https://connectrpc.com/docs/protocol/#error-codes) of the Connect response. @@ -161,14 +161,14 @@ groups: **Span kind** MUST be `CLIENT`. **Span status**: refer to the [Recording Errors](/docs/general/recording-errors.md) - document for details on how to record span status. See also `rpc.response.status_code` attribute + document for details on how to record span status. See also `rpc.status_code` attribute for the details on which values classify as errors. extends: rpc span_kind: client attributes: - ref: rpc.method requirement_level: required - - ref: rpc.response.status_code + - ref: rpc.status_code requirement_level: required brief: > The string representation of the [status code](https://github.com/grpc/grpc/blob/v1.75.0/doc/statuscodes.md) @@ -238,10 +238,10 @@ groups: **Span kind** MUST be `SERVER`. **Span status**: refer to the [Recording Errors](/docs/general/recording-errors.md) - document for details on how to record span status. See also `rpc.response.status_code` attribute + document for details on how to record span status. See also `rpc.status_code` attribute for the details on which values classify as errors. attributes: - - ref: rpc.response.status_code + - ref: rpc.status_code requirement_level: required brief: > The string representation of the [status code](https://github.com/grpc/grpc/blob/v1.75.0/doc/statuscodes.md) @@ -297,7 +297,7 @@ groups: When tracing instrumentation converts RPC method to `_OTHER`, it MUST also set `rpc.method_original` span attribute to the original value. requirement_level: opt_in - - ref: rpc.response.status_code + - ref: rpc.status_code brief: > The [`error.code`](https://www.jsonrpc.org/specification#error_object) property of response if it is an error response recorded as a string. @@ -349,7 +349,7 @@ groups: When tracing instrumentation converts RPC method to `_OTHER`, it MUST also set `rpc.method_original` span attribute to the original value. requirement_level: opt_in - - ref: rpc.response.status_code + - ref: rpc.status_code brief: > The [`error.code`](https://www.jsonrpc.org/specification#error_object) property of response recorded as a string. @@ -370,14 +370,14 @@ groups: **Span kind** MUST be `CLIENT`. **Span status** Refer to the [Recording Errors](/docs/general/recording-errors.md) - document for details on how to record span status. See also `rpc.response.status_code` attribute + document for details on how to record span status. See also `rpc.status_code` attribute for the details on which values classify as errors. extends: rpc span_kind: client attributes: - ref: rpc.method requirement_level: required - - ref: rpc.response.status_code + - ref: rpc.status_code requirement_level: required brief: > The string representation of the Dubbo response status code returned by the server or generated by the client. @@ -480,10 +480,10 @@ groups: **Span kind** MUST be `SERVER`. **Span status** Refer to the [Recording Errors](/docs/general/recording-errors.md) - document for details on how to record span status. See also `rpc.response.status_code` attribute + document for details on how to record span status. See also `rpc.status_code` attribute for the details on which values classify as errors. attributes: - - ref: rpc.response.status_code + - ref: rpc.status_code requirement_level: required brief: > The string representation of the Dubbo response status code returned by the server. From f4dcb0638be44ea6c45dfdc25e30e75163ba284a Mon Sep 17 00:00:00 2001 From: Liudmila Molkova Date: Wed, 22 Jul 2026 19:18:35 -0700 Subject: [PATCH 2/4] feedback --- .chloggen/{3919.yaml => 3921.yaml} | 0 docs/non-normative/rpc-migration.md | 8 ++++---- docs/rpc/connect-rpc.md | 4 ++-- docs/rpc/dubbo.md | 4 ++-- docs/rpc/grpc.md | 4 ++-- docs/rpc/json-rpc.md | 4 ++-- docs/rpc/rpc-metrics.md | 4 ++-- docs/rpc/rpc-spans.md | 4 ++-- model/rpc/common.yaml | 2 +- 9 files changed, 17 insertions(+), 17 deletions(-) rename .chloggen/{3919.yaml => 3921.yaml} (100%) diff --git a/.chloggen/3919.yaml b/.chloggen/3921.yaml similarity index 100% rename from .chloggen/3919.yaml rename to .chloggen/3921.yaml diff --git a/docs/non-normative/rpc-migration.md b/docs/non-normative/rpc-migration.md index d261e9cf31..f73137aa64 100644 --- a/docs/non-normative/rpc-migration.md +++ b/docs/non-normative/rpc-migration.md @@ -57,8 +57,8 @@ TODO (latest). | `rpc.service` | [#3223](https://github.com/open-telemetry/semantic-conventions/pull/3223) | Removed, integrated into `rpc.method` | | `network.transport` | [#3350](https://github.com/open-telemetry/semantic-conventions/pull/3350) | Removed | | `network.type` | [#2857](https://github.com/open-telemetry/semantic-conventions/pull/2857) | Removed | -| `rpc.grpc.status_code` → `rpc.status_code` | [#2920](https://github.com/open-telemetry/semantic-conventions/pull/2920) | Changed from int to string (e.g., `0` → `"OK"`) | -| `rpc.connect_rpc.error_code` → `rpc.status_code` | [#2920](https://github.com/open-telemetry/semantic-conventions/pull/2920) | | +| `rpc.grpc.status_code` → `rpc.status_code` | [#2920](https://github.com/open-telemetry/semantic-conventions/pull/2920), [#3921](https://github.com/open-telemetry/semantic-conventions/pull/3921) | Changed from int to string (e.g., `0` → `"OK"`) | +| `rpc.connect_rpc.error_code` → `rpc.status_code` | [#2920](https://github.com/open-telemetry/semantic-conventions/pull/2920), [#3921](https://github.com/open-telemetry/semantic-conventions/pull/3921) | | | `rpc.grpc.request.metadata.` | [#3169](https://github.com/open-telemetry/semantic-conventions/pull/3169) | Replaced by `rpc.request.metadata.` | | `rpc.grpc.response.metadata.` | [#3169](https://github.com/open-telemetry/semantic-conventions/pull/3169) | Replaced by `rpc.response.metadata.` | | `rpc.connect_rpc.request.metadata.` | [#3169](https://github.com/open-telemetry/semantic-conventions/pull/3169) | Replaced by `rpc.request.metadata.` | @@ -117,7 +117,7 @@ Metric changes: | `network.type` | [#2857](https://github.com/open-telemetry/semantic-conventions/pull/2857) | Removed | | `server.address` | [#3197](https://github.com/open-telemetry/semantic-conventions/pull/3197) | Changed from Recommended to Opt-In | | `server.port` | [#3197](https://github.com/open-telemetry/semantic-conventions/pull/3197) | Changed from Recommended to Opt-In | -| New: `rpc.status_code` | [#2920](https://github.com/open-telemetry/semantic-conventions/pull/2920) | | +| New: `rpc.status_code` | [#2920](https://github.com/open-telemetry/semantic-conventions/pull/2920), [#3921](https://github.com/open-telemetry/semantic-conventions/pull/3921) | | | New: `error.type` | [#2852](https://github.com/open-telemetry/semantic-conventions/pull/2852) | | @@ -149,7 +149,7 @@ Metric changes: | `network.type` | [#2857](https://github.com/open-telemetry/semantic-conventions/pull/2857) | Removed | | `server.address` | [#3197](https://github.com/open-telemetry/semantic-conventions/pull/3197) | Changed from Recommended to Required | | `server.port` | [#3197](https://github.com/open-telemetry/semantic-conventions/pull/3197) | Changed from Recommended to Conditionally Required | -| New: `rpc.status_code` | [#2920](https://github.com/open-telemetry/semantic-conventions/pull/2920) | | +| New: `rpc.status_code` | [#2920](https://github.com/open-telemetry/semantic-conventions/pull/2920), [#3921](https://github.com/open-telemetry/semantic-conventions/pull/3921) | | | New: `error.type` | [#2852](https://github.com/open-telemetry/semantic-conventions/pull/2852) | | diff --git a/docs/rpc/connect-rpc.md b/docs/rpc/connect-rpc.md index 022d0523a7..141c9fb6d2 100644 --- a/docs/rpc/connect-rpc.md +++ b/docs/rpc/connect-rpc.md @@ -60,7 +60,7 @@ document for details on how to record span status. `error.type` SHOULD be set to the exception type (its fully-qualified class name, if applicable) or a component-specific, low cardinality error identifier. -If a response status code is returned and status indicates an error, +If a status code is returned and it indicates an error, `error.type` SHOULD be set to that status code. Check system-specific conventions for the details on which values of `rpc.status_code` are considered errors. @@ -170,7 +170,7 @@ document for details on how to record span status. `error.type` SHOULD be set to the exception type (its fully-qualified class name, if applicable) or a component-specific, low cardinality error identifier. -If a response status code is returned and status indicates an error, +If a status code is returned and it indicates an error, `error.type` SHOULD be set to that status code. Check system-specific conventions for the details on which values of `rpc.status_code` are considered errors. diff --git a/docs/rpc/dubbo.md b/docs/rpc/dubbo.md index e0e24bfa87..2320c23076 100644 --- a/docs/rpc/dubbo.md +++ b/docs/rpc/dubbo.md @@ -90,7 +90,7 @@ Status codes reference: `error.type` SHOULD be set to the exception type (its fully-qualified class name, if applicable) or a component-specific, low cardinality error identifier. -If a response status code is returned and status indicates an error, +If a status code is returned and it indicates an error, `error.type` SHOULD be set to that status code. Check system-specific conventions for the details on which values of `rpc.status_code` are considered errors. @@ -257,7 +257,7 @@ Status codes reference: `error.type` SHOULD be set to the exception type (its fully-qualified class name, if applicable) or a component-specific, low cardinality error identifier. -If a response status code is returned and status indicates an error, +If a status code is returned and it indicates an error, `error.type` SHOULD be set to that status code. Check system-specific conventions for the details on which values of `rpc.status_code` are considered errors. diff --git a/docs/rpc/grpc.md b/docs/rpc/grpc.md index ef8d635927..f10032df36 100644 --- a/docs/rpc/grpc.md +++ b/docs/rpc/grpc.md @@ -130,7 +130,7 @@ Examples: `error.type` SHOULD be set to the exception type (its fully-qualified class name, if applicable) or a component-specific, low cardinality error identifier. -If a response status code is returned and status indicates an error, +If a status code is returned and it indicates an error, `error.type` SHOULD be set to that status code. Check system-specific conventions for the details on which values of `rpc.status_code` are considered errors. @@ -226,7 +226,7 @@ for the details on which values classify as errors. `error.type` SHOULD be set to the exception type (its fully-qualified class name, if applicable) or a component-specific, low cardinality error identifier. -If a response status code is returned and status indicates an error, +If a status code is returned and it indicates an error, `error.type` SHOULD be set to that status code. Check system-specific conventions for the details on which values of `rpc.status_code` are considered errors. diff --git a/docs/rpc/json-rpc.md b/docs/rpc/json-rpc.md index 3ebee1be3d..26134af3a1 100644 --- a/docs/rpc/json-rpc.md +++ b/docs/rpc/json-rpc.md @@ -60,7 +60,7 @@ are considered errors. `error.type` SHOULD be set to the exception type (its fully-qualified class name, if applicable) or a component-specific, low cardinality error identifier. -If a response status code is returned and status indicates an error, +If a status code is returned and it indicates an error, `error.type` SHOULD be set to that status code. Check system-specific conventions for the details on which values of `rpc.status_code` are considered errors. @@ -144,7 +144,7 @@ are considered errors. `error.type` SHOULD be set to the exception type (its fully-qualified class name, if applicable) or a component-specific, low cardinality error identifier. -If a response status code is returned and status indicates an error, +If a status code is returned and it indicates an error, `error.type` SHOULD be set to that status code. Check system-specific conventions for the details on which values of `rpc.status_code` are considered errors. diff --git a/docs/rpc/rpc-metrics.md b/docs/rpc/rpc-metrics.md index 13cd97b6a2..6063369678 100644 --- a/docs/rpc/rpc-metrics.md +++ b/docs/rpc/rpc-metrics.md @@ -87,7 +87,7 @@ SHOULD be the same as the RPC server span duration. `error.type` SHOULD be set to the exception type (its fully-qualified class name, if applicable) or a component-specific, low cardinality error identifier. -If a response status code is returned and status indicates an error, +If a status code is returned and it indicates an error, `error.type` SHOULD be set to that status code. Check system-specific conventions for the details on which values of `rpc.status_code` are considered errors. @@ -186,7 +186,7 @@ SHOULD be the same as the RPC client span duration. `error.type` SHOULD be set to the exception type (its fully-qualified class name, if applicable) or a component-specific, low cardinality error identifier. -If a response status code is returned and status indicates an error, +If a status code is returned and it indicates an error, `error.type` SHOULD be set to that status code. Check system-specific conventions for the details on which values of `rpc.status_code` are considered errors. diff --git a/docs/rpc/rpc-spans.md b/docs/rpc/rpc-spans.md index 8095f96b9f..31c601422c 100644 --- a/docs/rpc/rpc-spans.md +++ b/docs/rpc/rpc-spans.md @@ -103,7 +103,7 @@ document for details on how to record span status. `error.type` SHOULD be set to the exception type (its fully-qualified class name, if applicable) or a component-specific, low cardinality error identifier. -If a response status code is returned and status indicates an error, +If a status code is returned and it indicates an error, `error.type` SHOULD be set to that status code. Check system-specific conventions for the details on which values of `rpc.status_code` are considered errors. @@ -224,7 +224,7 @@ document for details on how to record span status. `error.type` SHOULD be set to the exception type (its fully-qualified class name, if applicable) or a component-specific, low cardinality error identifier. -If a response status code is returned and status indicates an error, +If a status code is returned and it indicates an error, `error.type` SHOULD be set to that status code. Check system-specific conventions for the details on which values of `rpc.status_code` are considered errors. diff --git a/model/rpc/common.yaml b/model/rpc/common.yaml index 788496a55f..deba52fe26 100644 --- a/model/rpc/common.yaml +++ b/model/rpc/common.yaml @@ -34,7 +34,7 @@ groups: `error.type` SHOULD be set to the exception type (its fully-qualified class name, if applicable) or a component-specific, low cardinality error identifier. - If a response status code is returned and status indicates an error, + If a status code is returned and it indicates an error, `error.type` SHOULD be set to that status code. Check system-specific conventions for the details on which values of `rpc.status_code` are considered errors. From 716845bcff1390226ae8b0b365e093bbb128751f Mon Sep 17 00:00:00 2001 From: Liudmila Molkova Date: Fri, 24 Jul 2026 12:59:15 -0700 Subject: [PATCH 3/4] Fix yamllint error in changelog entry --- .chloggen/3921.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.chloggen/3921.yaml b/.chloggen/3921.yaml index 24b9a70f4f..ff20ca52c0 100644 --- a/.chloggen/3921.yaml +++ b/.chloggen/3921.yaml @@ -2,4 +2,3 @@ change_type: breaking component: rpc note: Rename `rpc.response.status_code` to `rpc.status_code`. issues: [3870] - From b64d8118554da57b43eb5d66ea00630e9d183657 Mon Sep 17 00:00:00 2001 From: Liudmila Molkova Date: Fri, 24 Jul 2026 13:11:58 -0700 Subject: [PATCH 4/4] Keep rpc.response.status_code ref in deprecated MCP conventions --- model/mcp/deprecated/common-deprecated.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model/mcp/deprecated/common-deprecated.yaml b/model/mcp/deprecated/common-deprecated.yaml index 2d6c5a3a6e..7593d2240e 100644 --- a/model/mcp/deprecated/common-deprecated.yaml +++ b/model/mcp/deprecated/common-deprecated.yaml @@ -48,7 +48,7 @@ groups: - ref: mcp.method.name requirement_level: required - ref: mcp.protocol.version - - ref: rpc.status_code + - ref: rpc.response.status_code brief: The error code from the JSON-RPC response. requirement_level: conditionally_required: If response contains an error code.