From 697ee4e4d726fc900efb0702d46925123a8ff83f Mon Sep 17 00:00:00 2001 From: Liudmila Molkova Date: Wed, 22 Jul 2026 17:48:47 -0700 Subject: [PATCH 1/7] Clarify server.address | port on RPC server --- docs/rpc/grpc.md | 17 +++++++++-------- docs/rpc/rpc-spans.md | 14 ++++++-------- model/rpc/spans.yaml | 21 +++++++++++++++++++++ 3 files changed, 36 insertions(+), 16 deletions(-) diff --git a/docs/rpc/grpc.md b/docs/rpc/grpc.md index 1b9f979492..10135cd0c0 100644 --- a/docs/rpc/grpc.md +++ b/docs/rpc/grpc.md @@ -206,10 +206,10 @@ for the details on which values classify as 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. [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` | -| [`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` | +| [`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. [4] | `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` | +| [`server.address`](/docs/registry/attributes/server.md) | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | `Recommended` when 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) | `Recommended` If `server.address` is set. | int | Server port number. [6] | `50051` | | [`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"]` | @@ -260,13 +260,14 @@ 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] `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. -When address is an IP address, instrumentations SHOULD NOT do a reverse DNS lookup to obtain a DNS name and SHOULD set `server.address` to the provided IP address. +**[4] `network.peer.address`:** If a RPC involved multiple network calls (for example retries), the last contacted address SHOULD be used. -**[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. +**[5] `server.address`:** Instrumentations SHOULD populate `server.address` (along with `server.port`) +from the HTTP/2 `:authority` pseudo-header the client used to reach this +server and SHOULD NOT use actual network-level connection information for +this purpose. -**[6] `network.peer.address`:** If a RPC involved multiple network calls (for example retries), the last contacted address SHOULD be used. +**[6] `server.port`:** See the `server.address` for details. **[7] `rpc.request.metadata.`:** Instrumentations SHOULD require an explicit configuration of which metadata values are to be captured. Including all request metadata values can be a security risk - explicit configuration helps avoid leaking sensitive information. diff --git a/docs/rpc/rpc-spans.md b/docs/rpc/rpc-spans.md index 4179c27889..38368c19f8 100644 --- a/docs/rpc/rpc-spans.md +++ b/docs/rpc/rpc-spans.md @@ -213,10 +213,10 @@ document for details on how to record span status. | [`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` | -| [`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` | +| [`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` | | [`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` | +| [`server.address`](/docs/registry/attributes/server.md) | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | `Recommended` when available. | string | A string identifying a group of RPC server instances request is sent to. [7] | `example.com`; `10.1.2.80`; `/tmp/my.sock` | **[1] `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. @@ -261,13 +261,11 @@ 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. -**[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. -When address is an IP address, instrumentations SHOULD NOT do a reverse DNS lookup to obtain a DNS name and SHOULD set `server.address` to the provided IP address. +**[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. -**[6] `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. +**[6] `network.peer.address`:** If a RPC involved multiple network calls (for example retries), the last contacted address SHOULD be used. -**[7] `network.peer.address`:** If a RPC involved multiple network calls (for example retries), the last contacted address SHOULD be used. +**[7] `server.address`:** `server.address` and `server.port` describe the address the client used to reach this server (for example, the value the client resolved from the RPC target passed over `:authority` HTTP/2 pseudo-header). The following attributes can be important for making sampling decisions and SHOULD be provided **at span creation time** (if provided at all): diff --git a/model/rpc/spans.yaml b/model/rpc/spans.yaml index 20194777c3..1fd1434a77 100644 --- a/model/rpc/spans.yaml +++ b/model/rpc/spans.yaml @@ -77,6 +77,13 @@ groups: - ref: rpc.system.name requirement_level: required sampling_relevant: true + - ref: server.address + requirement_level: + recommended: when available. + note: > + `server.address` and `server.port` describe the address the client + used to reach this server (for example, the value the client resolved + from the RPC target passed over `:authority` HTTP/2 pseudo-header). - id: span.rpc.connect_rpc.call.client type: span @@ -260,6 +267,20 @@ groups: requirement_level: opt_in - ref: rpc.response.metadata requirement_level: opt_in + - ref: server.address + requirement_level: + recommended: when available. + note: | + Instrumentations SHOULD populate `server.address` (along with `server.port`) + from the HTTP/2 `:authority` pseudo-header the client used to reach this + server and SHOULD NOT use actual network-level connection information for + this purpose. + - ref: server.port + requirement_level: + recommended: If `server.address` is set. + note: > + See the `server.address` for details. + examples: [50051] - id: span.rpc.jsonrpc.call.client type: span From 25a6e0b0256ad16becdeb9aa72454b66a0fca4d7 Mon Sep 17 00:00:00 2001 From: Liudmila Molkova Date: Wed, 22 Jul 2026 18:19:50 -0700 Subject: [PATCH 2/7] feedback --- .chloggen/3919.yaml | 5 +++++ docs/rpc/grpc.md | 35 ++++++++++++++++++++++------------- docs/rpc/rpc-spans.md | 2 +- model/rpc/spans.yaml | 26 +++++++++++++++++--------- 4 files changed, 45 insertions(+), 23 deletions(-) create mode 100644 .chloggen/3919.yaml diff --git a/.chloggen/3919.yaml b/.chloggen/3919.yaml new file mode 100644 index 0000000000..1aa5b05d3a --- /dev/null +++ b/.chloggen/3919.yaml @@ -0,0 +1,5 @@ +change_type: enhancement +component: rpc +note: Clarify how to populate `server.address` and `server.port` on RPC server spans. +issues: [3784] + diff --git a/docs/rpc/grpc.md b/docs/rpc/grpc.md index 10135cd0c0..f5b9abee54 100644 --- a/docs/rpc/grpc.md +++ b/docs/rpc/grpc.md @@ -206,12 +206,12 @@ for the details on which values classify as 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. [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` | -| [`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. [4] | `10.1.2.80`; `/tmp/my.sock` | +| [`server.port`](/docs/registry/attributes/server.md) | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | `Conditionally Required` [4] | int | Server port number. [5] | `50051` | +| [`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` | -| [`server.address`](/docs/registry/attributes/server.md) | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | `Recommended` when 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) | `Recommended` If `server.address` is set. | int | Server port number. [6] | `50051` | -| [`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"]` | +| [`server.address`](/docs/registry/attributes/server.md) | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | `Recommended` when available. | string | A string identifying a group of RPC server instances request is sent to. [7] | `example.com`; `10.1.2.80`; `/tmp/my.sock` | +| [`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`:** The following status codes SHOULD be considered errors: @@ -260,22 +260,31 @@ 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] `network.peer.address`:** If a RPC involved multiple network calls (for example retries), the last contacted address SHOULD be used. +**[4] `server.port`:** If `server.address` is set and the port is present in `:authority`. + +**[5] `server.port`:** Instrumentations SHOULD populate `server.port` from the port +component of the HTTP/2 `:authority` pseudo-header the client used to +reach this server. + +Instrumentations SHOULD NOT use actual network-level connection +information for this purpose. -**[5] `server.address`:** Instrumentations SHOULD populate `server.address` (along with `server.port`) -from the HTTP/2 `:authority` pseudo-header the client used to reach this -server and SHOULD NOT use actual network-level connection information for -this purpose. +**[6] `network.peer.address`:** If a RPC involved multiple network calls (for example retries), the last contacted address SHOULD be used. -**[6] `server.port`:** See the `server.address` for details. +**[7] `server.address`:** Instrumentations SHOULD populate `server.address` from the host +component of the HTTP/2 `:authority` pseudo-header the client used to +reach this server. -**[7] `rpc.request.metadata.`:** Instrumentations SHOULD require an explicit configuration of which metadata values are to be captured. +Instrumentations SHOULD NOT use actual network-level connection +information for this purpose. + +**[8] `rpc.request.metadata.`:** Instrumentations SHOULD require an explicit configuration of which metadata values are to be captured. Including all request metadata values can be a security risk - explicit configuration helps avoid leaking sensitive information. For example, a property `my-custom-key` with value `["1.2.3.4", "1.2.3.5"]` SHOULD be recorded as `rpc.request.metadata.my-custom-key` attribute with value `["1.2.3.4", "1.2.3.5"]` -**[8] `rpc.response.metadata.`:** Instrumentations SHOULD require an explicit configuration of which metadata values are to be captured. +**[9] `rpc.response.metadata.`:** Instrumentations SHOULD require an explicit configuration of which metadata values are to be captured. Including all response metadata values can be a security risk - explicit configuration helps avoid leaking sensitive information. For example, a property `my-custom-key` with value `["attribute_value"]` SHOULD be recorded as diff --git a/docs/rpc/rpc-spans.md b/docs/rpc/rpc-spans.md index 38368c19f8..4aef38c629 100644 --- a/docs/rpc/rpc-spans.md +++ b/docs/rpc/rpc-spans.md @@ -265,7 +265,7 @@ Semantic conventions for individual RPC frameworks SHOULD document what `rpc.res **[6] `network.peer.address`:** If a RPC involved multiple network calls (for example retries), the last contacted address SHOULD be used. -**[7] `server.address`:** `server.address` and `server.port` describe the address the client used to reach this server (for example, the value the client resolved from the RPC target passed over `:authority` HTTP/2 pseudo-header). +**[7] `server.address`:** `server.address` and `server.port` describe the address the client used to reach this server, as reported by the transport or RPC framework (for example, the value the client resolved from the RPC target and sent on the wire). The following attributes can be important for making sampling decisions and SHOULD be provided **at span creation time** (if provided at all): diff --git a/model/rpc/spans.yaml b/model/rpc/spans.yaml index 1fd1434a77..78e1a45b14 100644 --- a/model/rpc/spans.yaml +++ b/model/rpc/spans.yaml @@ -82,8 +82,9 @@ groups: recommended: when available. note: > `server.address` and `server.port` describe the address the client - used to reach this server (for example, the value the client resolved - from the RPC target passed over `:authority` HTTP/2 pseudo-header). + used to reach this server, as reported by the transport or RPC + framework (for example, the value the client resolved from the RPC + target and sent on the wire). - id: span.rpc.connect_rpc.call.client type: span @@ -271,15 +272,22 @@ groups: requirement_level: recommended: when available. note: | - Instrumentations SHOULD populate `server.address` (along with `server.port`) - from the HTTP/2 `:authority` pseudo-header the client used to reach this - server and SHOULD NOT use actual network-level connection information for - this purpose. + Instrumentations SHOULD populate `server.address` from the host + component of the HTTP/2 `:authority` pseudo-header the client used to + reach this server. + + Instrumentations SHOULD NOT use actual network-level connection + information for this purpose. - ref: server.port requirement_level: - recommended: If `server.address` is set. - note: > - See the `server.address` for details. + conditionally_required: If `server.address` is set and the port is present in `:authority`. + note: | + Instrumentations SHOULD populate `server.port` from the port + component of the HTTP/2 `:authority` pseudo-header the client used to + reach this server. + + Instrumentations SHOULD NOT use actual network-level connection + information for this purpose. examples: [50051] - id: span.rpc.jsonrpc.call.client From c4a372d18c7b9c22b67eb0afd02f1f7c24cde15a Mon Sep 17 00:00:00 2001 From: Liudmila Molkova Date: Fri, 24 Jul 2026 14:24:37 -0700 Subject: [PATCH 3/7] align dubbo and connect-rpc --- docs/rpc/connect-rpc.md | 14 ++++++-------- docs/rpc/dubbo.md | 16 +++++++--------- docs/rpc/json-rpc.md | 20 +++++++++----------- docs/rpc/rpc-spans.md | 2 +- model/rpc/spans.yaml | 40 +++++++++++++++++++++++++--------------- 5 files changed, 48 insertions(+), 44 deletions(-) diff --git a/docs/rpc/connect-rpc.md b/docs/rpc/connect-rpc.md index 7a78ca1487..ae44aae9ec 100644 --- a/docs/rpc/connect-rpc.md +++ b/docs/rpc/connect-rpc.md @@ -159,10 +159,10 @@ document for details on how to record span status. | [`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` | -| [`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` | +| [`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` | +| [`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` | | [`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` | +| [`server.address`](/docs/registry/attributes/server.md) | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | `Recommended` when available. | string | A string identifying a group of RPC server instances request is sent to. [6] | `example.com`; `10.1.2.80`; `/tmp/my.sock` | | [`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"]` | @@ -213,13 +213,11 @@ RPC client stub method on the client side. - `unavailable` - `data_loss` -**[4] `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. -When address is an IP address, instrumentations SHOULD NOT do a reverse DNS lookup to obtain a DNS name and SHOULD set `server.address` to the provided IP address. +**[4] `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. -**[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. +**[5] `network.peer.address`:** If a RPC involved multiple network calls (for example retries), the last contacted address SHOULD be used. -**[6] `network.peer.address`:** If a RPC involved multiple network calls (for example retries), the last contacted address SHOULD be used. +**[6] `server.address`:** `server.address` and `server.port` describe the address the client used to reach this server, as reported by the transport or RPC framework. Instrumentations SHOULD NOT use actual network-level connection information to populate these attributes. If the address used by the client is unavailable, instrumentations SHOULD NOT set these attributes. **[7] `rpc.request.metadata.`:** Instrumentations SHOULD require an explicit configuration of which metadata values are to be captured. Including all request metadata values can be a security risk - explicit configuration helps avoid leaking sensitive information. diff --git a/docs/rpc/dubbo.md b/docs/rpc/dubbo.md index f8d3c1745c..75cec0bb36 100644 --- a/docs/rpc/dubbo.md +++ b/docs/rpc/dubbo.md @@ -225,10 +225,10 @@ for the details on which values classify as 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. [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` | -| [`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` [5] | 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` | +| [`server.port`](/docs/registry/attributes/server.md) | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | `Conditionally Required` [4] | 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` | +| [`server.address`](/docs/registry/attributes/server.md) | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | `Recommended` when available. | string | A string identifying a group of RPC server instances request is sent to. [7] | `example.com`; `10.1.2.80`; `/tmp/my.sock` | | [`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"]` | @@ -291,15 +291,13 @@ 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] `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. -When address is an IP address, instrumentations SHOULD NOT do a reverse DNS lookup to obtain a DNS name and SHOULD set `server.address` to the provided IP address. +**[4] `server.port`:** if `server.address` is set and if the port is supported by the network transport used for communication. -**[5] `server.port`:** if `server.address` is set and if the port is supported by the network transport used for communication. +**[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. -**[6] `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. +**[6] `network.peer.address`:** If a RPC involved multiple network calls (for example retries), the last contacted address SHOULD be used. -**[7] `network.peer.address`:** If a RPC involved multiple network calls (for example retries), the last contacted address SHOULD be used. +**[7] `server.address`:** `server.address` and `server.port` describe the address the client used to reach this server, as reported by the transport or RPC framework. Instrumentations SHOULD NOT use actual network-level connection information to populate these attributes. If the address used by the client is unavailable, instrumentations SHOULD NOT set these attributes. **[8] `rpc.request.metadata.`:** Instrumentations SHOULD require an explicit configuration of which metadata values are to be captured. Including all request metadata values can be a security risk - explicit configuration helps avoid leaking sensitive information. diff --git a/docs/rpc/json-rpc.md b/docs/rpc/json-rpc.md index c7e6886c1a..ccf481f481 100644 --- a/docs/rpc/json-rpc.md +++ b/docs/rpc/json-rpc.md @@ -133,11 +133,11 @@ are considered errors. | [`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` | -| [`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` | -| [`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` | +| [`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` | | [`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` | +| [`server.address`](/docs/registry/attributes/server.md) | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | `Recommended` when available. | string | A string identifying a group of RPC server instances request is sent to. [6] | `example.com`; `10.1.2.80`; `/tmp/my.sock` | | [`rpc.method`](/docs/registry/attributes/rpc.md) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Opt-In` | string | JSON-RPC method name provided in the request. [7] | `com.example.ExampleService/exampleMethod`; `EchoService/Echo`; `_OTHER` | **[1] `error.type`:** If the RPC fails with an error before status code is returned, @@ -156,16 +156,14 @@ If the request has completed successfully, instrumentations SHOULD NOT set **[2] `rpc.response.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. -When address is an IP address, instrumentations SHOULD NOT do a reverse DNS lookup to obtain a DNS name and SHOULD set `server.address` to the provided IP address. - -**[4] `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. +**[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. -**[5] `jsonrpc.request.id`:** Under the [JSON-RPC specification](https://www.jsonrpc.org/specification), the `id` property may be a string, number, null, or omitted entirely. When omitted, the request is treated as a notification. Using `null` is not equivalent to omitting the `id`, but it is discouraged. +**[4] `jsonrpc.request.id`:** Under the [JSON-RPC specification](https://www.jsonrpc.org/specification), the `id` property may be a string, number, null, or omitted entirely. When omitted, the request is treated as a notification. Using `null` is not equivalent to omitting the `id`, but it is discouraged. Instrumentations SHOULD NOT capture this attribute when the `id` is `null` or omitted. -**[6] `network.peer.address`:** If a RPC involved multiple network calls (for example retries), the last contacted address SHOULD be used. +**[5] `network.peer.address`:** If a RPC involved multiple network calls (for example retries), the last contacted address SHOULD be used. + +**[6] `server.address`:** `server.address` and `server.port` describe the address the client used to reach this server, as reported by the transport or RPC framework. Instrumentations SHOULD NOT use actual network-level connection information to populate these attributes. If the address used by the client is unavailable, instrumentations SHOULD NOT set these attributes. **[7] `rpc.method`:** JSON-RPC supports sending and receiving arbitrary method names without prior registration or definition. As a result, the method name MAY have unbounded cardinality in edge or error cases. General-purpose JSON-RPC instrumentations therefore SHOULD NOT set this attribute by default and SHOULD provide a way to configure the list of recognized RPC methods. When tracing instrumentation converts RPC method to `_OTHER`, it MUST also set `rpc.method_original` span attribute to the original value. diff --git a/docs/rpc/rpc-spans.md b/docs/rpc/rpc-spans.md index 4aef38c629..ab5a107459 100644 --- a/docs/rpc/rpc-spans.md +++ b/docs/rpc/rpc-spans.md @@ -265,7 +265,7 @@ Semantic conventions for individual RPC frameworks SHOULD document what `rpc.res **[6] `network.peer.address`:** If a RPC involved multiple network calls (for example retries), the last contacted address SHOULD be used. -**[7] `server.address`:** `server.address` and `server.port` describe the address the client used to reach this server, as reported by the transport or RPC framework (for example, the value the client resolved from the RPC target and sent on the wire). +**[7] `server.address`:** `server.address` and `server.port` describe the address the client used to reach this server, as reported by the transport or RPC framework. Instrumentations SHOULD NOT use actual network-level connection information to populate these attributes. If the address used by the client is unavailable, instrumentations SHOULD NOT set these attributes. The following attributes can be important for making sampling decisions and SHOULD be provided **at span creation time** (if provided at all): diff --git a/model/rpc/spans.yaml b/model/rpc/spans.yaml index 78e1a45b14..cc6826467c 100644 --- a/model/rpc/spans.yaml +++ b/model/rpc/spans.yaml @@ -25,6 +25,26 @@ groups: requirement_level: conditionally_required: If and only if it's different than `rpc.method`. + - id: attributes.rpc.server.server + type: attribute_group + extends: rpc + brief: > + `server.address` and `server.port` for RPC server spans. + attributes: + - ref: server.address + requirement_level: + recommended: when available. + note: > + `server.address` and `server.port` describe the address the client + used to reach this server, as reported by the transport or RPC + framework. Instrumentations SHOULD NOT use actual network-level + connection information to populate these attributes. If the address + used by the client is unavailable, instrumentations SHOULD NOT set + these attributes. + - ref: server.port + requirement_level: + conditionally_required: if applicable and if `server.address` is set. + - id: span.rpc.call.client type: span stability: release_candidate @@ -56,7 +76,7 @@ groups: - id: span.rpc.call.server type: span stability: release_candidate - extends: rpc + extends: attributes.rpc.server.server span_kind: server brief: This span represents an incoming Remote Procedure Call (RPC). note: | @@ -77,14 +97,6 @@ groups: - ref: rpc.system.name requirement_level: required sampling_relevant: true - - ref: server.address - requirement_level: - recommended: when available. - note: > - `server.address` and `server.port` describe the address the client - used to reach this server, as reported by the transport or RPC - framework (for example, the value the client resolved from the RPC - target and sent on the wire). - id: span.rpc.connect_rpc.call.client type: span @@ -126,7 +138,7 @@ groups: - id: span.rpc.connect_rpc.call.server type: span stability: development - extends: rpc + extends: attributes.rpc.server.server span_kind: server brief: This span represents an incoming Remote Procedure Call (RPC). note: | @@ -235,7 +247,7 @@ groups: - id: span.rpc.grpc.call.server type: span stability: release_candidate - extends: rpc + extends: attributes.rpc.server.server span_kind: server brief: This span represents an incoming Remote Procedure Call (RPC). note: | @@ -269,8 +281,6 @@ groups: - ref: rpc.response.metadata requirement_level: opt_in - ref: server.address - requirement_level: - recommended: when available. note: | Instrumentations SHOULD populate `server.address` from the host component of the HTTP/2 `:authority` pseudo-header the client used to @@ -345,7 +355,7 @@ groups: - id: span.rpc.jsonrpc.call.server type: span stability: development - extends: rpc + extends: attributes.rpc.server.server span_kind: server brief: This span represents an incoming Remote Procedure Call (RPC). note: | @@ -498,7 +508,7 @@ groups: - id: span.rpc.dubbo.call.server type: span stability: release_candidate - extends: rpc + extends: attributes.rpc.server.server span_kind: server brief: This span represents an incoming Remote Procedure Call (RPC). note: | From 3886be99342c323e66000ae125ef9b14b255fff3 Mon Sep 17 00:00:00 2001 From: Liudmila Molkova Date: Fri, 24 Jul 2026 14:38:53 -0700 Subject: [PATCH 4/7] also update note on metrics --- docs/rpc/rpc-metrics.md | 8 ++++++-- model/rpc/metrics.yaml | 14 +++++++------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/docs/rpc/rpc-metrics.md b/docs/rpc/rpc-metrics.md index 4d002ee4eb..41f631140e 100644 --- a/docs/rpc/rpc-metrics.md +++ b/docs/rpc/rpc-metrics.md @@ -78,8 +78,8 @@ SHOULD be the same as the RPC server span duration. | [`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` | -| [`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` | +| [`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. [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) | `Opt-In` | int | Server port number. [6] | `80`; `8080`; `443` | **[1] `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. @@ -124,6 +124,10 @@ 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. +**[5] `server.address`:** `server.address` and `server.port` describe the address the client used to reach this server, as reported by the transport or RPC framework. Instrumentations SHOULD NOT use actual network-level connection information to populate these attributes. If the address used by the client is unavailable, instrumentations SHOULD NOT set these attributes. + +**[6] `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. + --- `error.type` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used. diff --git a/model/rpc/metrics.yaml b/model/rpc/metrics.yaml index 8ae20199cd..4f4463e73a 100644 --- a/model/rpc/metrics.yaml +++ b/model/rpc/metrics.yaml @@ -17,17 +17,17 @@ groups: brief: "RPC server metric attributes." extends: attributes.metrics.rpc.client attributes: - - ref: rpc.system.name - requirement_level: required - ref: server.address - note: "" requirement_level: opt_in + note: > + `server.address` and `server.port` describe the address the client + used to reach this server, as reported by the transport or RPC + framework. Instrumentations SHOULD NOT use actual network-level + connection information to populate these attributes. If the address + used by the client is unavailable, instrumentations SHOULD NOT set + these attributes. - ref: server.port - note: "" requirement_level: opt_in - - ref: rpc.method - requirement_level: - conditionally_required: if available. # RPC Server metrics - id: metric.rpc.server.call.duration From 25f7b723e19b5076a25886489d9d96287eb74f2c Mon Sep 17 00:00:00 2001 From: Liudmila Molkova Date: Fri, 24 Jul 2026 14:41:50 -0700 Subject: [PATCH 5/7] update changelog --- .chloggen/3919.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.chloggen/3919.yaml b/.chloggen/3919.yaml index 1aa5b05d3a..b0fd451f2b 100644 --- a/.chloggen/3919.yaml +++ b/.chloggen/3919.yaml @@ -1,5 +1,8 @@ change_type: enhancement component: rpc -note: Clarify how to populate `server.address` and `server.port` on RPC server spans. +note: > + Clarify how to populate `server.address` and `server.port` on RPC server spans. + Change requirement level of `server.address` to `opt_in` on `rpc.server.call.duration` + metric and to `recommended` on server spans. issues: [3784] From 458965c6d568f6b176fc569b27f43e0f905cd8ab Mon Sep 17 00:00:00 2001 From: Liudmila Molkova Date: Fri, 24 Jul 2026 14:45:06 -0700 Subject: [PATCH 6/7] lint --- docs/rpc/grpc.md | 8 ++++---- model/rpc/spans.yaml | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/rpc/grpc.md b/docs/rpc/grpc.md index f5b9abee54..91e84dc89f 100644 --- a/docs/rpc/grpc.md +++ b/docs/rpc/grpc.md @@ -262,20 +262,20 @@ RPC client stub method on the client side. **[4] `server.port`:** If `server.address` is set and the port is present in `:authority`. -**[5] `server.port`:** Instrumentations SHOULD populate `server.port` from the port +**[5] `server.port`:** Instrumentations SHOULD populate `server.port` from the port component of the HTTP/2 `:authority` pseudo-header the client used to reach this server. -Instrumentations SHOULD NOT use actual network-level connection +Instrumentations SHOULD NOT use actual network-level connection information for this purpose. **[6] `network.peer.address`:** If a RPC involved multiple network calls (for example retries), the last contacted address SHOULD be used. -**[7] `server.address`:** Instrumentations SHOULD populate `server.address` from the host +**[7] `server.address`:** Instrumentations SHOULD populate `server.address` from the host component of the HTTP/2 `:authority` pseudo-header the client used to reach this server. -Instrumentations SHOULD NOT use actual network-level connection +Instrumentations SHOULD NOT use actual network-level connection information for this purpose. **[8] `rpc.request.metadata.`:** Instrumentations SHOULD require an explicit configuration of which metadata values are to be captured. diff --git a/model/rpc/spans.yaml b/model/rpc/spans.yaml index cc6826467c..423dcb1a22 100644 --- a/model/rpc/spans.yaml +++ b/model/rpc/spans.yaml @@ -282,21 +282,21 @@ groups: requirement_level: opt_in - ref: server.address note: | - Instrumentations SHOULD populate `server.address` from the host + Instrumentations SHOULD populate `server.address` from the host component of the HTTP/2 `:authority` pseudo-header the client used to reach this server. - Instrumentations SHOULD NOT use actual network-level connection + Instrumentations SHOULD NOT use actual network-level connection information for this purpose. - ref: server.port requirement_level: conditionally_required: If `server.address` is set and the port is present in `:authority`. note: | - Instrumentations SHOULD populate `server.port` from the port + Instrumentations SHOULD populate `server.port` from the port component of the HTTP/2 `:authority` pseudo-header the client used to reach this server. - Instrumentations SHOULD NOT use actual network-level connection + Instrumentations SHOULD NOT use actual network-level connection information for this purpose. examples: [50051] From ad43930d1573e6cad19bc4d32106a391ecc9bdc6 Mon Sep 17 00:00:00 2001 From: Liudmila Molkova Date: Fri, 24 Jul 2026 14:48:18 -0700 Subject: [PATCH 7/7] Fix changelog formatting --- .chloggen/3919.yaml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.chloggen/3919.yaml b/.chloggen/3919.yaml index b0fd451f2b..3e729c7ec2 100644 --- a/.chloggen/3919.yaml +++ b/.chloggen/3919.yaml @@ -1,8 +1,7 @@ change_type: enhancement component: rpc -note: > - Clarify how to populate `server.address` and `server.port` on RPC server spans. - Change requirement level of `server.address` to `opt_in` on `rpc.server.call.duration` +note: > + Clarify how to populate `server.address` and `server.port` on RPC server spans. + Change requirement level of `server.address` to `opt_in` on `rpc.server.call.duration` metric and to `recommended` on server spans. issues: [3784] -