From 2d1d094126d801db5d09ac6107444065e26ef03a Mon Sep 17 00:00:00 2001 From: crossoverJie Date: Thu, 25 Jul 2024 17:54:27 +0800 Subject: [PATCH 01/15] add attribute for rpc --- docs/attributes-registry/rpc.md | 4 ++++ docs/rpc/rpc-spans.md | 4 ++++ model/registry/rpc.yaml | 20 ++++++++++++++++++++ model/trace/rpc.yaml | 8 ++++++++ 4 files changed, 36 insertions(+) diff --git a/docs/attributes-registry/rpc.md b/docs/attributes-registry/rpc.md index 9c6088a1ce..e9377da98c 100644 --- a/docs/attributes-registry/rpc.md +++ b/docs/attributes-registry/rpc.md @@ -15,6 +15,8 @@ This document defines attributes for remote procedure calls. | Attribute | Type | Description | Examples | Stability | | ----------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------- | ---------------------------------------------------------------- | +| `rpc.client.request.body.size` | int | The size of the client request payload body in bytes. | `3495` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `rpc.client.response.body.size` | int | The size of the client response payload body in bytes. | `3495` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `rpc.connect_rpc.error_code` | string | The [error codes](https://connect.build/docs/protocol/#error-codes) of the Connect request. Error codes are always string values. | `cancelled`; `unknown`; `invalid_argument` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `rpc.connect_rpc.request.metadata.` | string[] | Connect request metadata, `` being the normalized Connect Metadata key (lowercase), the value being the metadata values. [1] | `rpc.request.metadata.my-custom-metadata-attribute=["1.2.3.4", "1.2.3.5"]` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `rpc.connect_rpc.response.metadata.` | string[] | Connect response metadata, `` being the normalized Connect Metadata key (lowercase), the value being the metadata values. [2] | `rpc.response.metadata.my-custom-metadata-attribute=["attribute_value"]` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | @@ -30,6 +32,8 @@ This document defines attributes for remote procedure calls. | `rpc.message.type` | string | Whether this is a received or sent message. | `SENT`; `RECEIVED` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `rpc.message.uncompressed_size` | int | Uncompressed size of the message in bytes. | | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `rpc.method` | string | The name of the (logical) method being called, must be equal to the $method part in the span name. [6] | `exampleMethod` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `rpc.server.request.body.size` | int | The size of the server request payload body in bytes. | `3495` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `rpc.server.response.body.size` | int | The size of the server response payload body in bytes. | `3495` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `rpc.service` | string | The full (logical) name of the service being called, including its package name, if applicable. [7] | `myservice.EchoService` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `rpc.system` | string | A string identifying the remoting system. See below for a list of well-known identifiers. | `grpc`; `java_rmi`; `dotnet_wcf` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | diff --git a/docs/rpc/rpc-spans.md b/docs/rpc/rpc-spans.md index 0595583160..995590e040 100644 --- a/docs/rpc/rpc-spans.md +++ b/docs/rpc/rpc-spans.md @@ -110,6 +110,8 @@ Generally, a user SHOULD NOT set `peer.service` to a fully qualified RPC service | [`network.peer.port`](/docs/attributes-registry/network.md) | int | Peer port number of the network connection. | `65123` | `Recommended` If `network.peer.address` is set. | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | | [`network.transport`](/docs/attributes-registry/network.md) | string | [OSI transport layer](https://osi-model.com/transport-layer/) or [inter-process communication method](https://wikipedia.org/wiki/Inter-process_communication). [4] | `tcp`; `udp` | `Recommended` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | | [`network.type`](/docs/attributes-registry/network.md) | string | [OSI network layer](https://osi-model.com/network-layer/) or non-OSI equivalent. [5] | `ipv4`; `ipv6` | `Recommended` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | +| [`rpc.client.request.body.size`](/docs/attributes-registry/rpc.md) | int | The size of the client request payload body in bytes. | `3495` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| [`rpc.client.response.body.size`](/docs/attributes-registry/rpc.md) | int | The size of the client response payload body in bytes. | `3495` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | [`rpc.method`](/docs/attributes-registry/rpc.md) | string | The name of the (logical) method being called, must be equal to the $method part in the span name. [6] | `exampleMethod` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | [`rpc.service`](/docs/attributes-registry/rpc.md) | string | The full (logical) name of the service being called, including its package name, if applicable. [7] | `myservice.EchoService` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | @@ -190,6 +192,8 @@ different processes could be listening on TCP port 12345 and UDP port 12345. | [`network.transport`](/docs/attributes-registry/network.md) | string | [OSI transport layer](https://osi-model.com/transport-layer/) or [inter-process communication method](https://wikipedia.org/wiki/Inter-process_communication). [6] | `tcp`; `udp` | `Recommended` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | | [`network.type`](/docs/attributes-registry/network.md) | string | [OSI network layer](https://osi-model.com/network-layer/) or non-OSI equivalent. [7] | `ipv4`; `ipv6` | `Recommended` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | | [`rpc.method`](/docs/attributes-registry/rpc.md) | string | The name of the (logical) method being called, must be equal to the $method part in the span name. [8] | `exampleMethod` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| [`rpc.server.request.body.size`](/docs/attributes-registry/rpc.md) | int | The size of the server request payload body in bytes. | `3495` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| [`rpc.server.response.body.size`](/docs/attributes-registry/rpc.md) | int | The size of the server response payload body in bytes. | `3495` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | [`rpc.service`](/docs/attributes-registry/rpc.md) | string | The full (logical) name of the service being called, including its package name, if applicable. [9] | `myservice.EchoService` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | **[1]:** May contain server IP address, DNS name, or local socket name. When host component is an IP address, instrumentations SHOULD NOT do a reverse proxy lookup to obtain DNS name and SHOULD set `server.address` to the IP address provided in the host component. diff --git a/model/registry/rpc.yaml b/model/registry/rpc.yaml index 8e04df3224..35eb822691 100644 --- a/model/registry/rpc.yaml +++ b/model/registry/rpc.yaml @@ -264,3 +264,23 @@ groups: type: int stability: experimental brief: "Uncompressed size of the message in bytes." + - id: client.request.body.size + type: int + stability: experimental + brief: "The size of the client request payload body in bytes." + examples: 3495 + - id: client.response.body.size + type: int + stability: experimental + brief: "The size of the client response payload body in bytes." + examples: 3495 + - id: server.request.body.size + type: int + stability: experimental + brief: "The size of the server request payload body in bytes." + examples: 3495 + - id: server.response.body.size + type: int + stability: experimental + brief: "The size of the server response payload body in bytes." + examples: 3495 diff --git a/model/trace/rpc.yaml b/model/trace/rpc.yaml index d578c6ba6a..b345a26c34 100644 --- a/model/trace/rpc.yaml +++ b/model/trace/rpc.yaml @@ -37,6 +37,10 @@ groups: - ref: network.peer.port requirement_level: recommended: If `network.peer.address` is set. + - ref: rpc.client.request.body.size + requirement_level: recommended + - ref: rpc.client.response.body.size + requirement_level: recommended - id: rpc.server type: span @@ -57,6 +61,10 @@ groups: requirement_level: recommended - ref: network.type requirement_level: recommended + - ref: rpc.server.request.body.size + requirement_level: recommended + - ref: rpc.server.response.body.size + requirement_level: recommended - id: rpc.grpc type: span From 4328535de71dc15013b7a9f7506b31201be03bd2 Mon Sep 17 00:00:00 2001 From: crossoverJie Date: Thu, 25 Jul 2024 18:02:57 +0800 Subject: [PATCH 02/15] add changelog --- .chloggen/rpc-attr-body.yaml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 .chloggen/rpc-attr-body.yaml diff --git a/.chloggen/rpc-attr-body.yaml b/.chloggen/rpc-attr-body.yaml new file mode 100755 index 0000000000..d2903fa57f --- /dev/null +++ b/.chloggen/rpc-attr-body.yaml @@ -0,0 +1,22 @@ +# Use this changelog template to create an entry for release notes. +# +# If your change doesn't affect end users you should instead start +# your pull request title with [chore] or use the "Skip Changelog" label. + +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the area of concern in the attributes-registry, (e.g. http, cloud, db) +component: rpc + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: add rpc request/response body size attributes + +# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. +# The values here must be integers. +issues: [] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: From ca94a1490a0978795376b38fc8be3c849ad0ad88 Mon Sep 17 00:00:00 2001 From: crossoverJie Date: Thu, 25 Jul 2024 18:13:03 +0800 Subject: [PATCH 03/15] add issues id --- .chloggen/rpc-attr-body.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.chloggen/rpc-attr-body.yaml b/.chloggen/rpc-attr-body.yaml index d2903fa57f..458bdfe0c0 100755 --- a/.chloggen/rpc-attr-body.yaml +++ b/.chloggen/rpc-attr-body.yaml @@ -14,7 +14,7 @@ note: add rpc request/response body size attributes # Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. # The values here must be integers. -issues: [] +issues: [1281] # (Optional) One or more lines of additional information to render under the primary note. # These lines will be padded with 2 spaces and then inserted directly into the document. From 7f370ca9a816f2e2a643a03f92206538a32f1c38 Mon Sep 17 00:00:00 2001 From: crossoverJie Date: Wed, 31 Jul 2024 18:50:01 +0800 Subject: [PATCH 04/15] fix with cr --- docs/attributes-registry/rpc.md | 6 ++---- docs/rpc/rpc-spans.md | 8 ++++---- model/registry/rpc.yaml | 18 ++++-------------- model/trace/rpc.yaml | 8 ++++---- 4 files changed, 14 insertions(+), 26 deletions(-) diff --git a/docs/attributes-registry/rpc.md b/docs/attributes-registry/rpc.md index e9377da98c..38b921256d 100644 --- a/docs/attributes-registry/rpc.md +++ b/docs/attributes-registry/rpc.md @@ -15,8 +15,6 @@ This document defines attributes for remote procedure calls. | Attribute | Type | Description | Examples | Stability | | ----------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------- | ---------------------------------------------------------------- | -| `rpc.client.request.body.size` | int | The size of the client request payload body in bytes. | `3495` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `rpc.client.response.body.size` | int | The size of the client response payload body in bytes. | `3495` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `rpc.connect_rpc.error_code` | string | The [error codes](https://connect.build/docs/protocol/#error-codes) of the Connect request. Error codes are always string values. | `cancelled`; `unknown`; `invalid_argument` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `rpc.connect_rpc.request.metadata.` | string[] | Connect request metadata, `` being the normalized Connect Metadata key (lowercase), the value being the metadata values. [1] | `rpc.request.metadata.my-custom-metadata-attribute=["1.2.3.4", "1.2.3.5"]` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `rpc.connect_rpc.response.metadata.` | string[] | Connect response metadata, `` being the normalized Connect Metadata key (lowercase), the value being the metadata values. [2] | `rpc.response.metadata.my-custom-metadata-attribute=["attribute_value"]` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | @@ -32,8 +30,8 @@ This document defines attributes for remote procedure calls. | `rpc.message.type` | string | Whether this is a received or sent message. | `SENT`; `RECEIVED` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `rpc.message.uncompressed_size` | int | Uncompressed size of the message in bytes. | | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `rpc.method` | string | The name of the (logical) method being called, must be equal to the $method part in the span name. [6] | `exampleMethod` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `rpc.server.request.body.size` | int | The size of the server request payload body in bytes. | `3495` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `rpc.server.response.body.size` | int | The size of the server response payload body in bytes. | `3495` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `rpc.request.body.size` | int | The size of the request payload body in bytes. For gRPC, this value is calculated through protobuf (including unary and streaming calls). | `3495` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `rpc.response.body.size` | int | The size of the response payload body in bytes. For gRPC, this value is calculated through protobuf (including unary and streaming calls). | `3495` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `rpc.service` | string | The full (logical) name of the service being called, including its package name, if applicable. [7] | `myservice.EchoService` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `rpc.system` | string | A string identifying the remoting system. See below for a list of well-known identifiers. | `grpc`; `java_rmi`; `dotnet_wcf` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | diff --git a/docs/rpc/rpc-spans.md b/docs/rpc/rpc-spans.md index 995590e040..d78d6c448b 100644 --- a/docs/rpc/rpc-spans.md +++ b/docs/rpc/rpc-spans.md @@ -110,9 +110,9 @@ Generally, a user SHOULD NOT set `peer.service` to a fully qualified RPC service | [`network.peer.port`](/docs/attributes-registry/network.md) | int | Peer port number of the network connection. | `65123` | `Recommended` If `network.peer.address` is set. | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | | [`network.transport`](/docs/attributes-registry/network.md) | string | [OSI transport layer](https://osi-model.com/transport-layer/) or [inter-process communication method](https://wikipedia.org/wiki/Inter-process_communication). [4] | `tcp`; `udp` | `Recommended` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | | [`network.type`](/docs/attributes-registry/network.md) | string | [OSI network layer](https://osi-model.com/network-layer/) or non-OSI equivalent. [5] | `ipv4`; `ipv6` | `Recommended` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | -| [`rpc.client.request.body.size`](/docs/attributes-registry/rpc.md) | int | The size of the client request payload body in bytes. | `3495` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| [`rpc.client.response.body.size`](/docs/attributes-registry/rpc.md) | int | The size of the client response payload body in bytes. | `3495` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | [`rpc.method`](/docs/attributes-registry/rpc.md) | string | The name of the (logical) method being called, must be equal to the $method part in the span name. [6] | `exampleMethod` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| [`rpc.request.body.size`](/docs/attributes-registry/rpc.md) | int | The size of the request payload body in bytes. For gRPC, this value is calculated through protobuf (including unary and streaming calls). | `3495` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| [`rpc.response.body.size`](/docs/attributes-registry/rpc.md) | int | The size of the response payload body in bytes. For gRPC, this value is calculated through protobuf (including unary and streaming calls). | `3495` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | [`rpc.service`](/docs/attributes-registry/rpc.md) | string | The full (logical) name of the service being called, including its package name, if applicable. [7] | `myservice.EchoService` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | **[1]:** May contain server IP address, DNS name, or local socket name. When host component is an IP address, instrumentations SHOULD NOT do a reverse proxy lookup to obtain DNS name and SHOULD set `server.address` to the IP address provided in the host component. @@ -192,8 +192,8 @@ different processes could be listening on TCP port 12345 and UDP port 12345. | [`network.transport`](/docs/attributes-registry/network.md) | string | [OSI transport layer](https://osi-model.com/transport-layer/) or [inter-process communication method](https://wikipedia.org/wiki/Inter-process_communication). [6] | `tcp`; `udp` | `Recommended` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | | [`network.type`](/docs/attributes-registry/network.md) | string | [OSI network layer](https://osi-model.com/network-layer/) or non-OSI equivalent. [7] | `ipv4`; `ipv6` | `Recommended` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | | [`rpc.method`](/docs/attributes-registry/rpc.md) | string | The name of the (logical) method being called, must be equal to the $method part in the span name. [8] | `exampleMethod` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| [`rpc.server.request.body.size`](/docs/attributes-registry/rpc.md) | int | The size of the server request payload body in bytes. | `3495` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| [`rpc.server.response.body.size`](/docs/attributes-registry/rpc.md) | int | The size of the server response payload body in bytes. | `3495` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| [`rpc.request.body.size`](/docs/attributes-registry/rpc.md) | int | The size of the request payload body in bytes. For gRPC, this value is calculated through protobuf (including unary and streaming calls). | `3495` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| [`rpc.response.body.size`](/docs/attributes-registry/rpc.md) | int | The size of the response payload body in bytes. For gRPC, this value is calculated through protobuf (including unary and streaming calls). | `3495` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | [`rpc.service`](/docs/attributes-registry/rpc.md) | string | The full (logical) name of the service being called, including its package name, if applicable. [9] | `myservice.EchoService` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | **[1]:** May contain server IP address, DNS name, or local socket name. When host component is an IP address, instrumentations SHOULD NOT do a reverse proxy lookup to obtain DNS name and SHOULD set `server.address` to the IP address provided in the host component. diff --git a/model/registry/rpc.yaml b/model/registry/rpc.yaml index 35eb822691..11ceb3e6f9 100644 --- a/model/registry/rpc.yaml +++ b/model/registry/rpc.yaml @@ -264,23 +264,13 @@ groups: type: int stability: experimental brief: "Uncompressed size of the message in bytes." - - id: client.request.body.size + - id: request.body.size type: int stability: experimental - brief: "The size of the client request payload body in bytes." + brief: "The size of the request payload body in bytes. For gRPC, this value is calculated through protobuf (including unary and streaming calls)." examples: 3495 - - id: client.response.body.size + - id: response.body.size type: int stability: experimental - brief: "The size of the client response payload body in bytes." - examples: 3495 - - id: server.request.body.size - type: int - stability: experimental - brief: "The size of the server request payload body in bytes." - examples: 3495 - - id: server.response.body.size - type: int - stability: experimental - brief: "The size of the server response payload body in bytes." + brief: "The size of the response payload body in bytes. For gRPC, this value is calculated through protobuf (including unary and streaming calls)." examples: 3495 diff --git a/model/trace/rpc.yaml b/model/trace/rpc.yaml index b345a26c34..446ed5ad2c 100644 --- a/model/trace/rpc.yaml +++ b/model/trace/rpc.yaml @@ -37,9 +37,9 @@ groups: - ref: network.peer.port requirement_level: recommended: If `network.peer.address` is set. - - ref: rpc.client.request.body.size + - ref: rpc.request.body.size requirement_level: recommended - - ref: rpc.client.response.body.size + - ref: rpc.response.body.size requirement_level: recommended - id: rpc.server @@ -61,9 +61,9 @@ groups: requirement_level: recommended - ref: network.type requirement_level: recommended - - ref: rpc.server.request.body.size + - ref: rpc.request.body.size requirement_level: recommended - - ref: rpc.server.response.body.size + - ref: rpc.response.body.size requirement_level: recommended - id: rpc.grpc From a9ba7d2160d15fc6e4151281f48ede6c60b6ff37 Mon Sep 17 00:00:00 2001 From: crossoverJie Date: Thu, 1 Aug 2024 15:16:00 +0800 Subject: [PATCH 05/15] add grpc body size description --- docs/attributes-registry/rpc.md | 12 ++++++++---- docs/rpc/grpc.md | 14 ++++++++++---- docs/rpc/rpc-spans.md | 24 ++++++++++++++++-------- model/registry/rpc.yaml | 8 ++++++-- model/trace/rpc.yaml | 6 ++++++ 5 files changed, 46 insertions(+), 18 deletions(-) diff --git a/docs/attributes-registry/rpc.md b/docs/attributes-registry/rpc.md index 38b921256d..5312c5e41b 100644 --- a/docs/attributes-registry/rpc.md +++ b/docs/attributes-registry/rpc.md @@ -30,9 +30,9 @@ This document defines attributes for remote procedure calls. | `rpc.message.type` | string | Whether this is a received or sent message. | `SENT`; `RECEIVED` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `rpc.message.uncompressed_size` | int | Uncompressed size of the message in bytes. | | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `rpc.method` | string | The name of the (logical) method being called, must be equal to the $method part in the span name. [6] | `exampleMethod` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `rpc.request.body.size` | int | The size of the request payload body in bytes. For gRPC, this value is calculated through protobuf (including unary and streaming calls). | `3495` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `rpc.response.body.size` | int | The size of the response payload body in bytes. For gRPC, this value is calculated through protobuf (including unary and streaming calls). | `3495` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `rpc.service` | string | The full (logical) name of the service being called, including its package name, if applicable. [7] | `myservice.EchoService` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `rpc.request.body.size` | int | The size of the request payload body in bytes. For gRPC, this value is calculated through protobuf (including unary and streaming calls). [7] | `3495` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `rpc.response.body.size` | int | The size of the response payload body in bytes. [8] | `3495` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `rpc.service` | string | The full (logical) name of the service being called, including its package name, if applicable. [9] | `myservice.EchoService` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `rpc.system` | string | A string identifying the remoting system. See below for a list of well-known identifiers. | `grpc`; `java_rmi`; `dotnet_wcf` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | **[1]:** 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. @@ -47,7 +47,11 @@ This document defines attributes for remote procedure calls. **[6]:** This is the logical name of the method from the RPC interface perspective, which can be different from the name of any implementing method/function. The `code.function` attribute may be used to store the latter (e.g., method actually executing the call on the server side, RPC client stub method on the client side). -**[7]:** This is the logical name of the service from the RPC interface perspective, which can be different from the name of any implementing class. The `code.namespace` attribute may be used to store the latter (despite the attribute name, it may include a class name; e.g., class with method actually executing the call on the server side, RPC client stub class on the client side). +**[7]:** For gRPC, this value is calculated through [protobuf](https://protobuf.dev/reference/java/api-docs/com/google/protobuf/MessageLite.html#getSerializedSize--) (including unary and streaming calls). + +**[8]:** For gRPC, this value is calculated through [protobuf](https://protobuf.dev/reference/java/api-docs/com/google/protobuf/MessageLite.html#getSerializedSize--) (including unary and streaming calls). + +**[9]:** This is the logical name of the service from the RPC interface perspective, which can be different from the name of any implementing class. The `code.namespace` attribute may be used to store the latter (despite the attribute name, it may include a class name; e.g., class with method actually executing the call on the server side, RPC client stub class on the client side). `rpc.connect_rpc.error_code` 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/docs/rpc/grpc.md b/docs/rpc/grpc.md index 8121784130..7d42a94fe8 100644 --- a/docs/rpc/grpc.md +++ b/docs/rpc/grpc.md @@ -26,12 +26,18 @@ Below is a table of attributes that SHOULD be included on client and server gRPC | Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| | [`rpc.grpc.status_code`](/docs/attributes-registry/rpc.md) | int | The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request. | `0`; `1`; `2` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| [`rpc.grpc.request.metadata.`](/docs/attributes-registry/rpc.md) | string[] | gRPC request metadata, `` being the normalized gRPC Metadata key (lowercase), the value being the metadata values. [1] | `rpc.grpc.request.metadata.my-custom-metadata-attribute=["1.2.3.4", "1.2.3.5"]` | `Opt-In` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| [`rpc.grpc.response.metadata.`](/docs/attributes-registry/rpc.md) | string[] | gRPC response metadata, `` being the normalized gRPC Metadata key (lowercase), the value being the metadata values. [2] | `rpc.grpc.response.metadata.my-custom-metadata-attribute=["attribute_value"]` | `Opt-In` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| [`rpc.request.body.size`](/docs/attributes-registry/rpc.md) | int | The size of the request payload body in bytes. For gRPC, this value is calculated through protobuf (including unary and streaming calls). [1] | `3495` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| [`rpc.response.body.size`](/docs/attributes-registry/rpc.md) | int | The size of the response payload body in bytes. [2] | `3495` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| [`rpc.grpc.request.metadata.`](/docs/attributes-registry/rpc.md) | string[] | gRPC request metadata, `` being the normalized gRPC Metadata key (lowercase), the value being the metadata values. [3] | `rpc.grpc.request.metadata.my-custom-metadata-attribute=["1.2.3.4", "1.2.3.5"]` | `Opt-In` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| [`rpc.grpc.response.metadata.`](/docs/attributes-registry/rpc.md) | string[] | gRPC response metadata, `` being the normalized gRPC Metadata key (lowercase), the value being the metadata values. [4] | `rpc.grpc.response.metadata.my-custom-metadata-attribute=["attribute_value"]` | `Opt-In` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -**[1]:** 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. +**[1]:** For gRPC, this value is calculated through [protobuf](https://protobuf.dev/reference/java/api-docs/com/google/protobuf/MessageLite.html#getSerializedSize--) (including unary and streaming calls). -**[2]:** 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. +**[2]:** For gRPC, this value is calculated through [protobuf](https://protobuf.dev/reference/java/api-docs/com/google/protobuf/MessageLite.html#getSerializedSize--) (including unary and streaming calls). + +**[3]:** 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. + +**[4]:** 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. diff --git a/docs/rpc/rpc-spans.md b/docs/rpc/rpc-spans.md index d78d6c448b..60df9c86c2 100644 --- a/docs/rpc/rpc-spans.md +++ b/docs/rpc/rpc-spans.md @@ -111,9 +111,9 @@ Generally, a user SHOULD NOT set `peer.service` to a fully qualified RPC service | [`network.transport`](/docs/attributes-registry/network.md) | string | [OSI transport layer](https://osi-model.com/transport-layer/) or [inter-process communication method](https://wikipedia.org/wiki/Inter-process_communication). [4] | `tcp`; `udp` | `Recommended` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | | [`network.type`](/docs/attributes-registry/network.md) | string | [OSI network layer](https://osi-model.com/network-layer/) or non-OSI equivalent. [5] | `ipv4`; `ipv6` | `Recommended` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | | [`rpc.method`](/docs/attributes-registry/rpc.md) | string | The name of the (logical) method being called, must be equal to the $method part in the span name. [6] | `exampleMethod` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| [`rpc.request.body.size`](/docs/attributes-registry/rpc.md) | int | The size of the request payload body in bytes. For gRPC, this value is calculated through protobuf (including unary and streaming calls). | `3495` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| [`rpc.response.body.size`](/docs/attributes-registry/rpc.md) | int | The size of the response payload body in bytes. For gRPC, this value is calculated through protobuf (including unary and streaming calls). | `3495` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| [`rpc.service`](/docs/attributes-registry/rpc.md) | string | The full (logical) name of the service being called, including its package name, if applicable. [7] | `myservice.EchoService` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| [`rpc.request.body.size`](/docs/attributes-registry/rpc.md) | int | The size of the request payload body in bytes. For gRPC, this value is calculated through protobuf (including unary and streaming calls). [7] | `3495` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| [`rpc.response.body.size`](/docs/attributes-registry/rpc.md) | int | The size of the response payload body in bytes. [8] | `3495` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| [`rpc.service`](/docs/attributes-registry/rpc.md) | string | The full (logical) name of the service being called, including its package name, if applicable. [9] | `myservice.EchoService` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | **[1]:** May contain server IP address, DNS name, or local socket name. When host component is an IP address, instrumentations SHOULD NOT do a reverse proxy lookup to obtain DNS name and SHOULD set `server.address` to the IP address provided in the host component. @@ -131,7 +131,11 @@ different processes could be listening on TCP port 12345 and UDP port 12345. **[6]:** This is the logical name of the method from the RPC interface perspective, which can be different from the name of any implementing method/function. The `code.function` attribute may be used to store the latter (e.g., method actually executing the call on the server side, RPC client stub method on the client side). -**[7]:** This is the logical name of the service from the RPC interface perspective, which can be different from the name of any implementing class. The `code.namespace` attribute may be used to store the latter (despite the attribute name, it may include a class name; e.g., class with method actually executing the call on the server side, RPC client stub class on the client side). +**[7]:** For gRPC, this value is calculated through [protobuf](https://protobuf.dev/reference/java/api-docs/com/google/protobuf/MessageLite.html#getSerializedSize--) (including unary and streaming calls). + +**[8]:** For gRPC, this value is calculated through [protobuf](https://protobuf.dev/reference/java/api-docs/com/google/protobuf/MessageLite.html#getSerializedSize--) (including unary and streaming calls). + +**[9]:** This is the logical name of the service from the RPC interface perspective, which can be different from the name of any implementing class. The `code.namespace` attribute may be used to store the latter (despite the attribute name, it may include a class name; e.g., class with method actually executing the call on the server side, RPC client stub class on the client side). @@ -192,9 +196,9 @@ different processes could be listening on TCP port 12345 and UDP port 12345. | [`network.transport`](/docs/attributes-registry/network.md) | string | [OSI transport layer](https://osi-model.com/transport-layer/) or [inter-process communication method](https://wikipedia.org/wiki/Inter-process_communication). [6] | `tcp`; `udp` | `Recommended` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | | [`network.type`](/docs/attributes-registry/network.md) | string | [OSI network layer](https://osi-model.com/network-layer/) or non-OSI equivalent. [7] | `ipv4`; `ipv6` | `Recommended` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | | [`rpc.method`](/docs/attributes-registry/rpc.md) | string | The name of the (logical) method being called, must be equal to the $method part in the span name. [8] | `exampleMethod` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| [`rpc.request.body.size`](/docs/attributes-registry/rpc.md) | int | The size of the request payload body in bytes. For gRPC, this value is calculated through protobuf (including unary and streaming calls). | `3495` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| [`rpc.response.body.size`](/docs/attributes-registry/rpc.md) | int | The size of the response payload body in bytes. For gRPC, this value is calculated through protobuf (including unary and streaming calls). | `3495` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| [`rpc.service`](/docs/attributes-registry/rpc.md) | string | The full (logical) name of the service being called, including its package name, if applicable. [9] | `myservice.EchoService` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| [`rpc.request.body.size`](/docs/attributes-registry/rpc.md) | int | The size of the request payload body in bytes. For gRPC, this value is calculated through protobuf (including unary and streaming calls). [9] | `3495` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| [`rpc.response.body.size`](/docs/attributes-registry/rpc.md) | int | The size of the response payload body in bytes. [10] | `3495` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| [`rpc.service`](/docs/attributes-registry/rpc.md) | string | The full (logical) name of the service being called, including its package name, if applicable. [11] | `myservice.EchoService` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | **[1]:** May contain server IP address, DNS name, or local socket name. When host component is an IP address, instrumentations SHOULD NOT do a reverse proxy lookup to obtain DNS name and SHOULD set `server.address` to the IP address provided in the host component. @@ -216,7 +220,11 @@ different processes could be listening on TCP port 12345 and UDP port 12345. **[8]:** This is the logical name of the method from the RPC interface perspective, which can be different from the name of any implementing method/function. The `code.function` attribute may be used to store the latter (e.g., method actually executing the call on the server side, RPC client stub method on the client side). -**[9]:** This is the logical name of the service from the RPC interface perspective, which can be different from the name of any implementing class. The `code.namespace` attribute may be used to store the latter (despite the attribute name, it may include a class name; e.g., class with method actually executing the call on the server side, RPC client stub class on the client side). +**[9]:** For gRPC, this value is calculated through [protobuf](https://protobuf.dev/reference/java/api-docs/com/google/protobuf/MessageLite.html#getSerializedSize--) (including unary and streaming calls). + +**[10]:** For gRPC, this value is calculated through [protobuf](https://protobuf.dev/reference/java/api-docs/com/google/protobuf/MessageLite.html#getSerializedSize--) (including unary and streaming calls). + +**[11]:** This is the logical name of the service from the RPC interface perspective, which can be different from the name of any implementing class. The `code.namespace` attribute may be used to store the latter (despite the attribute name, it may include a class name; e.g., class with method actually executing the call on the server side, RPC client stub class on the client side). diff --git a/model/registry/rpc.yaml b/model/registry/rpc.yaml index 11ceb3e6f9..5612d07a3f 100644 --- a/model/registry/rpc.yaml +++ b/model/registry/rpc.yaml @@ -267,10 +267,14 @@ groups: - id: request.body.size type: int stability: experimental - brief: "The size of the request payload body in bytes. For gRPC, this value is calculated through protobuf (including unary and streaming calls)." + brief: "The size of the request payload body in bytes." + note: > + For gRPC, this value is calculated through [protobuf](https://protobuf.dev/reference/java/api-docs/com/google/protobuf/MessageLite.html#getSerializedSize--) (including unary and streaming calls). examples: 3495 - id: response.body.size type: int stability: experimental - brief: "The size of the response payload body in bytes. For gRPC, this value is calculated through protobuf (including unary and streaming calls)." + brief: "The size of the response payload body in bytes." + note: > + For gRPC, this value is calculated through [protobuf](https://protobuf.dev/reference/java/api-docs/com/google/protobuf/MessageLite.html#getSerializedSize--) (including unary and streaming calls). examples: 3495 diff --git a/model/trace/rpc.yaml b/model/trace/rpc.yaml index 446ed5ad2c..e563962655 100644 --- a/model/trace/rpc.yaml +++ b/model/trace/rpc.yaml @@ -80,6 +80,12 @@ groups: - ref: rpc.grpc.response.metadata tag: grpc-tech-specific requirement_level: opt_in + - ref: rpc.request.body.size + tag: grpc-tech-specific + requirement_level: recommended + - ref: rpc.response.body.size + tag: grpc-tech-specific + requirement_level: recommended - id: rpc.jsonrpc prefix: rpc.jsonrpc From e468b2697223c1500b75a8c890b5986b847869ca Mon Sep 17 00:00:00 2001 From: crossoverJie Date: Thu, 1 Aug 2024 15:25:32 +0800 Subject: [PATCH 06/15] fix ci --- docs/attributes-registry/rpc.md | 2 +- docs/rpc/grpc.md | 2 +- docs/rpc/rpc-spans.md | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/attributes-registry/rpc.md b/docs/attributes-registry/rpc.md index 5312c5e41b..d517eaf4a1 100644 --- a/docs/attributes-registry/rpc.md +++ b/docs/attributes-registry/rpc.md @@ -30,7 +30,7 @@ This document defines attributes for remote procedure calls. | `rpc.message.type` | string | Whether this is a received or sent message. | `SENT`; `RECEIVED` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `rpc.message.uncompressed_size` | int | Uncompressed size of the message in bytes. | | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `rpc.method` | string | The name of the (logical) method being called, must be equal to the $method part in the span name. [6] | `exampleMethod` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `rpc.request.body.size` | int | The size of the request payload body in bytes. For gRPC, this value is calculated through protobuf (including unary and streaming calls). [7] | `3495` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `rpc.request.body.size` | int | The size of the request payload body in bytes. [7] | `3495` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `rpc.response.body.size` | int | The size of the response payload body in bytes. [8] | `3495` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `rpc.service` | string | The full (logical) name of the service being called, including its package name, if applicable. [9] | `myservice.EchoService` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `rpc.system` | string | A string identifying the remoting system. See below for a list of well-known identifiers. | `grpc`; `java_rmi`; `dotnet_wcf` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | diff --git a/docs/rpc/grpc.md b/docs/rpc/grpc.md index 7d42a94fe8..fd0f368acd 100644 --- a/docs/rpc/grpc.md +++ b/docs/rpc/grpc.md @@ -26,7 +26,7 @@ Below is a table of attributes that SHOULD be included on client and server gRPC | Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| | [`rpc.grpc.status_code`](/docs/attributes-registry/rpc.md) | int | The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request. | `0`; `1`; `2` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| [`rpc.request.body.size`](/docs/attributes-registry/rpc.md) | int | The size of the request payload body in bytes. For gRPC, this value is calculated through protobuf (including unary and streaming calls). [1] | `3495` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| [`rpc.request.body.size`](/docs/attributes-registry/rpc.md) | int | The size of the request payload body in bytes. [1] | `3495` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | [`rpc.response.body.size`](/docs/attributes-registry/rpc.md) | int | The size of the response payload body in bytes. [2] | `3495` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | [`rpc.grpc.request.metadata.`](/docs/attributes-registry/rpc.md) | string[] | gRPC request metadata, `` being the normalized gRPC Metadata key (lowercase), the value being the metadata values. [3] | `rpc.grpc.request.metadata.my-custom-metadata-attribute=["1.2.3.4", "1.2.3.5"]` | `Opt-In` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | [`rpc.grpc.response.metadata.`](/docs/attributes-registry/rpc.md) | string[] | gRPC response metadata, `` being the normalized gRPC Metadata key (lowercase), the value being the metadata values. [4] | `rpc.grpc.response.metadata.my-custom-metadata-attribute=["attribute_value"]` | `Opt-In` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | diff --git a/docs/rpc/rpc-spans.md b/docs/rpc/rpc-spans.md index 60df9c86c2..1f3f2f00bc 100644 --- a/docs/rpc/rpc-spans.md +++ b/docs/rpc/rpc-spans.md @@ -111,7 +111,7 @@ Generally, a user SHOULD NOT set `peer.service` to a fully qualified RPC service | [`network.transport`](/docs/attributes-registry/network.md) | string | [OSI transport layer](https://osi-model.com/transport-layer/) or [inter-process communication method](https://wikipedia.org/wiki/Inter-process_communication). [4] | `tcp`; `udp` | `Recommended` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | | [`network.type`](/docs/attributes-registry/network.md) | string | [OSI network layer](https://osi-model.com/network-layer/) or non-OSI equivalent. [5] | `ipv4`; `ipv6` | `Recommended` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | | [`rpc.method`](/docs/attributes-registry/rpc.md) | string | The name of the (logical) method being called, must be equal to the $method part in the span name. [6] | `exampleMethod` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| [`rpc.request.body.size`](/docs/attributes-registry/rpc.md) | int | The size of the request payload body in bytes. For gRPC, this value is calculated through protobuf (including unary and streaming calls). [7] | `3495` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| [`rpc.request.body.size`](/docs/attributes-registry/rpc.md) | int | The size of the request payload body in bytes. [7] | `3495` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | [`rpc.response.body.size`](/docs/attributes-registry/rpc.md) | int | The size of the response payload body in bytes. [8] | `3495` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | [`rpc.service`](/docs/attributes-registry/rpc.md) | string | The full (logical) name of the service being called, including its package name, if applicable. [9] | `myservice.EchoService` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | @@ -196,7 +196,7 @@ different processes could be listening on TCP port 12345 and UDP port 12345. | [`network.transport`](/docs/attributes-registry/network.md) | string | [OSI transport layer](https://osi-model.com/transport-layer/) or [inter-process communication method](https://wikipedia.org/wiki/Inter-process_communication). [6] | `tcp`; `udp` | `Recommended` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | | [`network.type`](/docs/attributes-registry/network.md) | string | [OSI network layer](https://osi-model.com/network-layer/) or non-OSI equivalent. [7] | `ipv4`; `ipv6` | `Recommended` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | | [`rpc.method`](/docs/attributes-registry/rpc.md) | string | The name of the (logical) method being called, must be equal to the $method part in the span name. [8] | `exampleMethod` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| [`rpc.request.body.size`](/docs/attributes-registry/rpc.md) | int | The size of the request payload body in bytes. For gRPC, this value is calculated through protobuf (including unary and streaming calls). [9] | `3495` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| [`rpc.request.body.size`](/docs/attributes-registry/rpc.md) | int | The size of the request payload body in bytes. [9] | `3495` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | [`rpc.response.body.size`](/docs/attributes-registry/rpc.md) | int | The size of the response payload body in bytes. [10] | `3495` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | [`rpc.service`](/docs/attributes-registry/rpc.md) | string | The full (logical) name of the service being called, including its package name, if applicable. [11] | `myservice.EchoService` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | From e63d2f610ff127a610c1b8b3998bf1ff18083456 Mon Sep 17 00:00:00 2001 From: crossoverJie Date: Thu, 1 Aug 2024 15:27:40 +0800 Subject: [PATCH 07/15] fix ci --- model/registry/rpc.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/model/registry/rpc.yaml b/model/registry/rpc.yaml index 5612d07a3f..12f0ff5506 100644 --- a/model/registry/rpc.yaml +++ b/model/registry/rpc.yaml @@ -269,12 +269,14 @@ groups: stability: experimental brief: "The size of the request payload body in bytes." note: > - For gRPC, this value is calculated through [protobuf](https://protobuf.dev/reference/java/api-docs/com/google/protobuf/MessageLite.html#getSerializedSize--) (including unary and streaming calls). + For gRPC, this value is calculated through [protobuf](https://protobuf.dev/reference/java/api-docs/com/google/protobuf/MessageLite.html#getSerializedSize--) + (including unary and streaming calls). examples: 3495 - id: response.body.size type: int stability: experimental brief: "The size of the response payload body in bytes." note: > - For gRPC, this value is calculated through [protobuf](https://protobuf.dev/reference/java/api-docs/com/google/protobuf/MessageLite.html#getSerializedSize--) (including unary and streaming calls). + For gRPC, this value is calculated through [protobuf](https://protobuf.dev/reference/java/api-docs/com/google/protobuf/MessageLite.html#getSerializedSize--) + (including unary and streaming calls). examples: 3495 From 47fa14864ac331e6b38ee4e3b6f46ff8c6e1163b Mon Sep 17 00:00:00 2001 From: crossoverJie Date: Fri, 2 Aug 2024 11:40:04 +0800 Subject: [PATCH 08/15] Merge master --- model/registry/rpc.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/model/registry/rpc.yaml b/model/registry/rpc.yaml index cdca70a88d..233204d06f 100644 --- a/model/registry/rpc.yaml +++ b/model/registry/rpc.yaml @@ -262,7 +262,7 @@ groups: type: int stability: experimental brief: "Uncompressed size of the message in bytes." - - id: request.body.size + - id: rpc.request.body.size type: int stability: experimental brief: "The size of the request payload body in bytes." @@ -270,7 +270,7 @@ groups: For gRPC, this value is calculated through [protobuf](https://protobuf.dev/reference/java/api-docs/com/google/protobuf/MessageLite.html#getSerializedSize--) (including unary and streaming calls). examples: 3495 - - id: response.body.size + - id: rpc.response.body.size type: int stability: experimental brief: "The size of the response payload body in bytes." From 0cfee173e07ec86ce0b26bae2024f7877e67afd6 Mon Sep 17 00:00:00 2001 From: crossoverJie Date: Wed, 7 Aug 2024 11:01:34 +0800 Subject: [PATCH 09/15] Update model/registry/rpc.yaml Co-authored-by: Liudmila Molkova --- model/registry/rpc.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model/registry/rpc.yaml b/model/registry/rpc.yaml index 233204d06f..996eea46cf 100644 --- a/model/registry/rpc.yaml +++ b/model/registry/rpc.yaml @@ -267,7 +267,7 @@ groups: stability: experimental brief: "The size of the request payload body in bytes." note: > - For gRPC, this value is calculated through [protobuf](https://protobuf.dev/reference/java/api-docs/com/google/protobuf/MessageLite.html#getSerializedSize--) + The request body size represents the serialized size of the message payload that is sent over the wire. In case of streaming calls, it accounts for the original message in the request and does not include size of the consequent message stream. (including unary and streaming calls). examples: 3495 - id: rpc.response.body.size From 9aef0f41f7d8cea8c2091190e20f3dc81cfb721a Mon Sep 17 00:00:00 2001 From: crossoverJie Date: Wed, 7 Aug 2024 11:01:48 +0800 Subject: [PATCH 10/15] Update model/registry/rpc.yaml Co-authored-by: Liudmila Molkova --- model/registry/rpc.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model/registry/rpc.yaml b/model/registry/rpc.yaml index 996eea46cf..8892278e4a 100644 --- a/model/registry/rpc.yaml +++ b/model/registry/rpc.yaml @@ -275,6 +275,6 @@ groups: stability: experimental brief: "The size of the response payload body in bytes." note: > - For gRPC, this value is calculated through [protobuf](https://protobuf.dev/reference/java/api-docs/com/google/protobuf/MessageLite.html#getSerializedSize--) + The response body size represents the serialized size of the message payload that is received in the response over the wire. In case of streaming calls, it accounts for the first response payload and does not include size of the consequent message stream. (including unary and streaming calls). examples: 3495 From eacb4a149d3045b8552c51fef9a803d2f8733220 Mon Sep 17 00:00:00 2001 From: crossoverJie Date: Wed, 7 Aug 2024 11:03:35 +0800 Subject: [PATCH 11/15] Update model/trace/rpc.yaml Co-authored-by: Liudmila Molkova --- model/trace/rpc.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/model/trace/rpc.yaml b/model/trace/rpc.yaml index da82a48973..56f8640e4a 100644 --- a/model/trace/rpc.yaml +++ b/model/trace/rpc.yaml @@ -85,6 +85,9 @@ groups: - ref: rpc.response.body.size tag: grpc-tech-specific requirement_level: recommended + note: > + The response body size represents the serialized size of the message payload that is received in the response over the wire. In case of streaming calls, it accounts for the first response payload and does not include size of the consequent message stream. + This value can usually be obtained from protobuf API such as [AbstractMessage#getSerializedSize](https://protobuf.dev/reference/java/api-docs/com/google/protobuf/AbstractMessage.html#getSerializedSize--). - id: rpc.jsonrpc type: span From e06b9e15c561695513798c47874ff4c1585a42f6 Mon Sep 17 00:00:00 2001 From: crossoverJie Date: Wed, 7 Aug 2024 11:03:43 +0800 Subject: [PATCH 12/15] Update model/trace/rpc.yaml Co-authored-by: Liudmila Molkova --- model/trace/rpc.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/model/trace/rpc.yaml b/model/trace/rpc.yaml index 56f8640e4a..c6548a2284 100644 --- a/model/trace/rpc.yaml +++ b/model/trace/rpc.yaml @@ -82,6 +82,9 @@ groups: - ref: rpc.request.body.size tag: grpc-tech-specific requirement_level: recommended + note: > + The request body size represents the serialized size of the message payload that is sent over the wire. In case of streaming calls, it accounts for the original message in the request and does not include size of the consequent message stream. + This value can usually be obtained from protobuf API such as [AbstractMessage#getSerializedSize](https://protobuf.dev/reference/java/api-docs/com/google/protobuf/AbstractMessage.html#getSerializedSize--). - ref: rpc.response.body.size tag: grpc-tech-specific requirement_level: recommended From 1da22088b9f422e866f074c4d45dad2e647ec2cb Mon Sep 17 00:00:00 2001 From: crossoverJie Date: Wed, 7 Aug 2024 11:13:17 +0800 Subject: [PATCH 13/15] merge CR --- docs/attributes-registry/rpc.md | 4 ++-- docs/rpc/grpc.md | 4 ++-- docs/rpc/rpc-spans.md | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/attributes-registry/rpc.md b/docs/attributes-registry/rpc.md index d517eaf4a1..c2ecf0ee4f 100644 --- a/docs/attributes-registry/rpc.md +++ b/docs/attributes-registry/rpc.md @@ -47,9 +47,9 @@ This document defines attributes for remote procedure calls. **[6]:** This is the logical name of the method from the RPC interface perspective, which can be different from the name of any implementing method/function. The `code.function` attribute may be used to store the latter (e.g., method actually executing the call on the server side, RPC client stub method on the client side). -**[7]:** For gRPC, this value is calculated through [protobuf](https://protobuf.dev/reference/java/api-docs/com/google/protobuf/MessageLite.html#getSerializedSize--) (including unary and streaming calls). +**[7]:** The request body size represents the serialized size of the message payload that is sent over the wire. In case of streaming calls, it accounts for the original message in the request and does not include size of the consequent message stream. (including unary and streaming calls). -**[8]:** For gRPC, this value is calculated through [protobuf](https://protobuf.dev/reference/java/api-docs/com/google/protobuf/MessageLite.html#getSerializedSize--) (including unary and streaming calls). +**[8]:** The response body size represents the serialized size of the message payload that is received in the response over the wire. In case of streaming calls, it accounts for the first response payload and does not include size of the consequent message stream. (including unary and streaming calls). **[9]:** This is the logical name of the service from the RPC interface perspective, which can be different from the name of any implementing class. The `code.namespace` attribute may be used to store the latter (despite the attribute name, it may include a class name; e.g., class with method actually executing the call on the server side, RPC client stub class on the client side). diff --git a/docs/rpc/grpc.md b/docs/rpc/grpc.md index ac50af034c..6d01de9f59 100644 --- a/docs/rpc/grpc.md +++ b/docs/rpc/grpc.md @@ -31,9 +31,9 @@ Below is a table of attributes that SHOULD be included on client and server gRPC | [`rpc.grpc.request.metadata.`](/docs/attributes-registry/rpc.md) | string[] | gRPC request metadata, `` being the normalized gRPC Metadata key (lowercase), the value being the metadata values. [3] | `rpc.grpc.request.metadata.my-custom-metadata-attribute=["1.2.3.4", "1.2.3.5"]` | `Opt-In` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | [`rpc.grpc.response.metadata.`](/docs/attributes-registry/rpc.md) | string[] | gRPC response metadata, `` being the normalized gRPC Metadata key (lowercase), the value being the metadata values. [4] | `rpc.grpc.response.metadata.my-custom-metadata-attribute=["attribute_value"]` | `Opt-In` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -**[1]:** For gRPC, this value is calculated through [protobuf](https://protobuf.dev/reference/java/api-docs/com/google/protobuf/MessageLite.html#getSerializedSize--) (including unary and streaming calls). +**[1]:** The request body size represents the serialized size of the message payload that is sent over the wire. In case of streaming calls, it accounts for the original message in the request and does not include size of the consequent message stream. This value can usually be obtained from protobuf API such as [AbstractMessage#getSerializedSize](https://protobuf.dev/reference/java/api-docs/com/google/protobuf/AbstractMessage.html#getSerializedSize--). -**[2]:** For gRPC, this value is calculated through [protobuf](https://protobuf.dev/reference/java/api-docs/com/google/protobuf/MessageLite.html#getSerializedSize--) (including unary and streaming calls). +**[2]:** The response body size represents the serialized size of the message payload that is received in the response over the wire. In case of streaming calls, it accounts for the first response payload and does not include size of the consequent message stream. This value can usually be obtained from protobuf API such as [AbstractMessage#getSerializedSize](https://protobuf.dev/reference/java/api-docs/com/google/protobuf/AbstractMessage.html#getSerializedSize--). **[3]:** 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 89774d79d5..c332a7759d 100644 --- a/docs/rpc/rpc-spans.md +++ b/docs/rpc/rpc-spans.md @@ -131,9 +131,9 @@ different processes could be listening on TCP port 12345 and UDP port 12345. **[6]:** This is the logical name of the method from the RPC interface perspective, which can be different from the name of any implementing method/function. The `code.function` attribute may be used to store the latter (e.g., method actually executing the call on the server side, RPC client stub method on the client side). -**[7]:** For gRPC, this value is calculated through [protobuf](https://protobuf.dev/reference/java/api-docs/com/google/protobuf/MessageLite.html#getSerializedSize--) (including unary and streaming calls). +**[7]:** The request body size represents the serialized size of the message payload that is sent over the wire. In case of streaming calls, it accounts for the original message in the request and does not include size of the consequent message stream. (including unary and streaming calls). -**[8]:** For gRPC, this value is calculated through [protobuf](https://protobuf.dev/reference/java/api-docs/com/google/protobuf/MessageLite.html#getSerializedSize--) (including unary and streaming calls). +**[8]:** The response body size represents the serialized size of the message payload that is received in the response over the wire. In case of streaming calls, it accounts for the first response payload and does not include size of the consequent message stream. (including unary and streaming calls). **[9]:** This is the logical name of the service from the RPC interface perspective, which can be different from the name of any implementing class. The `code.namespace` attribute may be used to store the latter (despite the attribute name, it may include a class name; e.g., class with method actually executing the call on the server side, RPC client stub class on the client side). @@ -220,9 +220,9 @@ different processes could be listening on TCP port 12345 and UDP port 12345. **[8]:** This is the logical name of the method from the RPC interface perspective, which can be different from the name of any implementing method/function. The `code.function` attribute may be used to store the latter (e.g., method actually executing the call on the server side, RPC client stub method on the client side). -**[9]:** For gRPC, this value is calculated through [protobuf](https://protobuf.dev/reference/java/api-docs/com/google/protobuf/MessageLite.html#getSerializedSize--) (including unary and streaming calls). +**[9]:** The request body size represents the serialized size of the message payload that is sent over the wire. In case of streaming calls, it accounts for the original message in the request and does not include size of the consequent message stream. (including unary and streaming calls). -**[10]:** For gRPC, this value is calculated through [protobuf](https://protobuf.dev/reference/java/api-docs/com/google/protobuf/MessageLite.html#getSerializedSize--) (including unary and streaming calls). +**[10]:** The response body size represents the serialized size of the message payload that is received in the response over the wire. In case of streaming calls, it accounts for the first response payload and does not include size of the consequent message stream. (including unary and streaming calls). **[11]:** This is the logical name of the service from the RPC interface perspective, which can be different from the name of any implementing class. The `code.namespace` attribute may be used to store the latter (despite the attribute name, it may include a class name; e.g., class with method actually executing the call on the server side, RPC client stub class on the client side). From 228457e015350ceeda1f5c75b5355444774400b1 Mon Sep 17 00:00:00 2001 From: crossoverJie Date: Wed, 7 Aug 2024 11:15:24 +0800 Subject: [PATCH 14/15] fix ci --- model/registry/rpc.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/model/registry/rpc.yaml b/model/registry/rpc.yaml index 8892278e4a..089f98131e 100644 --- a/model/registry/rpc.yaml +++ b/model/registry/rpc.yaml @@ -267,7 +267,8 @@ groups: stability: experimental brief: "The size of the request payload body in bytes." note: > - The request body size represents the serialized size of the message payload that is sent over the wire. In case of streaming calls, it accounts for the original message in the request and does not include size of the consequent message stream. + The request body size represents the serialized size of the message payload that is sent over the wire. + In case of streaming calls, it accounts for the original message in the request and does not include size of the consequent message stream. (including unary and streaming calls). examples: 3495 - id: rpc.response.body.size @@ -275,6 +276,7 @@ groups: stability: experimental brief: "The size of the response payload body in bytes." note: > - The response body size represents the serialized size of the message payload that is received in the response over the wire. In case of streaming calls, it accounts for the first response payload and does not include size of the consequent message stream. + The response body size represents the serialized size of the message payload that is received in the response over the wire. + In case of streaming calls, it accounts for the first response payload and does not include size of the consequent message stream. (including unary and streaming calls). examples: 3495 From 80e7bd20b44bfa6d98386ebd267d3f52926a8ca2 Mon Sep 17 00:00:00 2001 From: crossoverJie Date: Wed, 7 Aug 2024 11:20:09 +0800 Subject: [PATCH 15/15] fix ci --- docs/rpc/grpc.md | 2 +- model/trace/rpc.yaml | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/docs/rpc/grpc.md b/docs/rpc/grpc.md index 6d01de9f59..b8567942fb 100644 --- a/docs/rpc/grpc.md +++ b/docs/rpc/grpc.md @@ -33,7 +33,7 @@ Below is a table of attributes that SHOULD be included on client and server gRPC **[1]:** The request body size represents the serialized size of the message payload that is sent over the wire. In case of streaming calls, it accounts for the original message in the request and does not include size of the consequent message stream. This value can usually be obtained from protobuf API such as [AbstractMessage#getSerializedSize](https://protobuf.dev/reference/java/api-docs/com/google/protobuf/AbstractMessage.html#getSerializedSize--). -**[2]:** The response body size represents the serialized size of the message payload that is received in the response over the wire. In case of streaming calls, it accounts for the first response payload and does not include size of the consequent message stream. This value can usually be obtained from protobuf API such as [AbstractMessage#getSerializedSize](https://protobuf.dev/reference/java/api-docs/com/google/protobuf/AbstractMessage.html#getSerializedSize--). +**[2]:** The response body size represents the serialized size of the message payload that is received in the response over the wire. In case of streaming calls, it accounts for the first response payload and does not include size of the consequent message stream. This value can usually be obtained from protobuf API such as [AbstractMessage#getSerializedSize](https://protobuf.dev/reference/java/api-docs/com/google/protobuf/AbstractMessage.html#getSerializedSize--). **[3]:** 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/model/trace/rpc.yaml b/model/trace/rpc.yaml index c6548a2284..82ced48a51 100644 --- a/model/trace/rpc.yaml +++ b/model/trace/rpc.yaml @@ -83,14 +83,18 @@ groups: tag: grpc-tech-specific requirement_level: recommended note: > - The request body size represents the serialized size of the message payload that is sent over the wire. In case of streaming calls, it accounts for the original message in the request and does not include size of the consequent message stream. - This value can usually be obtained from protobuf API such as [AbstractMessage#getSerializedSize](https://protobuf.dev/reference/java/api-docs/com/google/protobuf/AbstractMessage.html#getSerializedSize--). + The request body size represents the serialized size of the message payload that is sent over the wire. + In case of streaming calls, it accounts for the original message in the request and does not include size of the consequent message stream. + This value can usually be obtained from protobuf API such as + [AbstractMessage#getSerializedSize](https://protobuf.dev/reference/java/api-docs/com/google/protobuf/AbstractMessage.html#getSerializedSize--). - ref: rpc.response.body.size tag: grpc-tech-specific requirement_level: recommended note: > - The response body size represents the serialized size of the message payload that is received in the response over the wire. In case of streaming calls, it accounts for the first response payload and does not include size of the consequent message stream. - This value can usually be obtained from protobuf API such as [AbstractMessage#getSerializedSize](https://protobuf.dev/reference/java/api-docs/com/google/protobuf/AbstractMessage.html#getSerializedSize--). + The response body size represents the serialized size of the message payload that is received in the response over the wire. + In case of streaming calls, it accounts for the first response payload and does not include size of the consequent message stream. + This value can usually be obtained from protobuf API such as + [AbstractMessage#getSerializedSize](https://protobuf.dev/reference/java/api-docs/com/google/protobuf/AbstractMessage.html#getSerializedSize--). - id: rpc.jsonrpc type: span