You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/attributes-registry/rpc.md
+17-4
Original file line number
Diff line number
Diff line change
@@ -20,8 +20,12 @@ RPC attributes are intended to be used in the context of events related to remot
20
20
|`rpc.jsonrpc.error_message`| string |`error.message` property of response if it is an error response. |`Parse error`; `User already exists`||
21
21
|`rpc.jsonrpc.request_id`| string |`id` property of request or response. Since protocol allows id to be int, string, `null` or missing (for notifications), value is expected to be cast to string for simplicity. Use empty string in case of `null` value. Omit entirely if this is a notification. |`10`; `request-7`; `` ||
22
22
|`rpc.jsonrpc.version`| string | Protocol version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0 doesn't specify this, the value can be omitted. |`2.0`; `1.0`||
23
-
|`rpc.method`| string | The name of the (logical) method being called, must be equal to the $method part in the span name. [5]|`exampleMethod`||
24
-
|`rpc.service`| string | The full (logical) name of the service being called, including its package name, if applicable. [6]|`myservice.EchoService`||
23
+
|`rpc.message.compressed_size`| int | Compressed size of the message in bytes. |||
24
+
|`rpc.message.id`| int | MUST be calculated as two different counters starting from `1` one for sent messages and one for received message. [5]|||
25
+
|`rpc.message.type`| string | Whether this is a received or sent message. |`SENT`||
26
+
|`rpc.message.uncompressed_size`| int | Uncompressed size of the message in bytes. |||
27
+
|`rpc.method`| string | The name of the (logical) method being called, must be equal to the $method part in the span name. [6]|`exampleMethod`||
28
+
|`rpc.service`| string | The full (logical) name of the service being called, including its package name, if applicable. [7]|`myservice.EchoService`||
25
29
|`rpc.system`| string | A string identifying the remoting system. See below for a list of well-known identifiers. |`grpc`||
26
30
27
31
**[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.
@@ -32,9 +36,11 @@ RPC attributes are intended to be used in the context of events related to remot
32
36
33
37
**[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.
34
38
35
-
**[5]:** 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).
39
+
**[5]:** This way we guarantee that the values will be consistent between different implementations.
36
40
37
-
**[6]:** 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).
41
+
**[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).
42
+
43
+
**[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).
38
44
39
45
`rpc.connect_rpc.error_code` MUST be one of the following:
40
46
@@ -79,6 +85,13 @@ RPC attributes are intended to be used in the context of events related to remot
|`SENT`| sent ||
93
+
|`RECEIVED`| received ||
94
+
82
95
`rpc.system` 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.
|`message.compressed_size`| int | Compressed size of the message in bytes. ||`Recommended`||
200
-
|`message.id`| int | MUST be calculated as two different counters starting from `1` one for sent messages and one for received message. [1]||`Recommended`||
201
-
|`message.type`| string | Whether this is a received or sent message. |`SENT`|`Recommended`||
202
-
|`message.uncompressed_size`| int | Uncompressed size of the message in bytes. ||`Recommended`||
199
+
|[`rpc.message.compressed_size`](../attributes-registry/rpc.md)| int | Compressed size of the message in bytes. ||`Recommended`||
200
+
|[`rpc.message.id`](../attributes-registry/rpc.md)| int | MUST be calculated as two different counters starting from `1` one for sent messages and one for received message. [1]||`Recommended`||
201
+
|[`rpc.message.type`](../attributes-registry/rpc.md)| string | Whether this is a received or sent message. |`SENT`|`Recommended`||
202
+
|[`rpc.message.uncompressed_size`](../attributes-registry/rpc.md)| int | Uncompressed size of the message in bytes. ||`Recommended`||
203
203
204
204
**[1]:** This way we guarantee that the values will be consistent between different implementations.
0 commit comments