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/rpc/grpc.md
+32-20Lines changed: 32 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,10 +40,12 @@ This span represents an outgoing Remote Procedure Call (RPC).
40
40
|[`server.port`](/docs/registry/attributes/server.md)| int | Server port number. [4]|`80`; `8080`; `443`|`Conditionally Required`[5]||
41
41
|[`network.peer.address`](/docs/registry/attributes/network.md)| string | Peer address of the network connection - IP address or Unix domain socket name. |`10.1.2.80`; `/tmp/my.sock`|`Recommended`||
42
42
|[`network.peer.port`](/docs/registry/attributes/network.md)| int | Peer port number of the network connection. |`65123`|`Recommended` If `network.peer.address` is set. ||
43
-
|[`network.transport`](/docs/registry/attributes/network.md)| string |[OSI transport layer](https://wikipedia.org/wiki/Transport_layer) or [inter-process communication method](https://wikipedia.org/wiki/Inter-process_communication). [6]|`tcp`; `udp`|`Recommended`||
44
-
|[`network.type`](/docs/registry/attributes/network.md)| string |[OSI network layer](https://wikipedia.org/wiki/Network_layer) or non-OSI equivalent. [7]|`ipv4`; `ipv6`|`Recommended`||
45
-
|[`rpc.grpc.request.metadata.<key>`](/docs/registry/attributes/rpc.md)| string[]| gRPC request metadata, `<key>` being the normalized gRPC Metadata key (lowercase), the value being the metadata values. [8]|`["1.2.3.4", "1.2.3.5"]`|`Opt-In`||
46
-
|[`rpc.grpc.response.metadata.<key>`](/docs/registry/attributes/rpc.md)| string[]| gRPC response metadata, `<key>` being the normalized gRPC Metadata key (lowercase), the value being the metadata values. [9]|`["attribute_value"]`|`Opt-In`||
43
+
|[`network.protocol.name`](/docs/registry/attributes/network.md)| string |[OSI application layer](https://wikipedia.org/wiki/Application_layer) or non-OSI equivalent. [6]|`http`|`Recommended`||
44
+
|[`network.protocol.version`](/docs/registry/attributes/network.md)| string | The actual version of the protocol used for network communication. [7]|`1.1`; `2`|`Recommended`||
45
+
|[`network.transport`](/docs/registry/attributes/network.md)| string |[OSI transport layer](https://wikipedia.org/wiki/Transport_layer) or [inter-process communication method](https://wikipedia.org/wiki/Inter-process_communication). [8]|`tcp`; `udp`|`Recommended`||
46
+
|[`network.type`](/docs/registry/attributes/network.md)| string |[OSI network layer](https://wikipedia.org/wiki/Network_layer) or non-OSI equivalent. [9]|`ipv4`; `ipv6`|`Recommended`||
47
+
|[`rpc.grpc.request.metadata.<key>`](/docs/registry/attributes/rpc.md)| string[]| gRPC request metadata, `<key>` being the normalized gRPC Metadata key (lowercase), the value being the metadata values. [10]|`["1.2.3.4", "1.2.3.5"]`|`Opt-In`||
48
+
|[`rpc.grpc.response.metadata.<key>`](/docs/registry/attributes/rpc.md)| string[]| gRPC response metadata, `<key>` being the normalized gRPC Metadata key (lowercase), the value being the metadata values. [11]|`["attribute_value"]`|`Opt-In`||
47
49
48
50
**[1]`rpc.method`:** 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.name` 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).
49
51
@@ -55,21 +57,25 @@ This span represents an outgoing Remote Procedure Call (RPC).
55
57
56
58
**[5]`server.port`:** if the port is supported by the network transport used for communication.
57
59
58
-
**[6]`network.transport`:** The value SHOULD be normalized to lowercase.
60
+
**[6]`network.protocol.name`:** The value SHOULD be normalized to lowercase.
61
+
62
+
**[7]`network.protocol.version`:** If protocol version is subject to negotiation (for example using [ALPN](https://www.rfc-editor.org/rfc/rfc7301.html)), this attribute SHOULD be set to the negotiated version. If the actual protocol version is not known, this attribute SHOULD NOT be set.
63
+
64
+
**[8]`network.transport`:** The value SHOULD be normalized to lowercase.
59
65
60
66
Consider always setting the transport when setting a port number, since
61
67
a port number is ambiguous without knowing the transport. For example
62
68
different processes could be listening on TCP port 12345 and UDP port 12345.
63
69
64
-
**[7]`network.type`:** The value SHOULD be normalized to lowercase.
70
+
**[9]`network.type`:** The value SHOULD be normalized to lowercase.
65
71
66
-
**[8]`rpc.grpc.request.metadata.<key>`:** Instrumentations SHOULD require an explicit configuration of which metadata values are to be captured.
72
+
**[10]`rpc.grpc.request.metadata.<key>`:** Instrumentations SHOULD require an explicit configuration of which metadata values are to be captured.
67
73
Including all request metadata values can be a security risk - explicit configuration helps avoid leaking sensitive information.
68
74
69
75
For example, a property `my-custom-key` with value `["1.2.3.4", "1.2.3.5"]` SHOULD be recorded as
70
76
`rpc.grpc.request.metadata.my-custom-key` attribute with value `["1.2.3.4", "1.2.3.5"]`
71
77
72
-
**[9]`rpc.grpc.response.metadata.<key>`:** Instrumentations SHOULD require an explicit configuration of which metadata values are to be captured.
78
+
**[11]`rpc.grpc.response.metadata.<key>`:** Instrumentations SHOULD require an explicit configuration of which metadata values are to be captured.
73
79
Including all response metadata values can be a security risk - explicit configuration helps avoid leaking sensitive information.
74
80
75
81
For example, a property `my-custom-key` with value `["attribute_value"]` SHOULD be recorded as
@@ -155,12 +161,14 @@ This span represents an incoming Remote Procedure Call (RPC).
155
161
|[`client.port`](/docs/registry/attributes/client.md)| int | Client port number. [5]|`65123`|`Recommended`||
156
162
|[`network.peer.address`](/docs/registry/attributes/network.md)| string | Peer address of the network connection - IP address or Unix domain socket name. |`10.1.2.80`; `/tmp/my.sock`|`Recommended`||
157
163
|[`network.peer.port`](/docs/registry/attributes/network.md)| int | Peer port number of the network connection. |`65123`|`Recommended` If `network.peer.address` is set. ||
158
-
|[`network.transport`](/docs/registry/attributes/network.md)| string |[OSI transport layer](https://wikipedia.org/wiki/Transport_layer) or [inter-process communication method](https://wikipedia.org/wiki/Inter-process_communication). [6]|`tcp`; `udp`|`Recommended`||
159
-
|[`network.type`](/docs/registry/attributes/network.md)| string |[OSI network layer](https://wikipedia.org/wiki/Network_layer) or non-OSI equivalent. [7]|`ipv4`; `ipv6`|`Recommended`||
160
-
|[`rpc.method`](/docs/registry/attributes/rpc.md)| string | This is the logical name of the method from the RPC interface perspective. [8]|`exampleMethod`|`Recommended`||
161
-
|[`rpc.service`](/docs/registry/attributes/rpc.md)| string | The full (logical) name of the service being called, including its package name, if applicable. [9]|`myservice.EchoService`|`Recommended`||
162
-
|[`rpc.grpc.request.metadata.<key>`](/docs/registry/attributes/rpc.md)| string[]| gRPC request metadata, `<key>` being the normalized gRPC Metadata key (lowercase), the value being the metadata values. [10]|`["1.2.3.4", "1.2.3.5"]`|`Opt-In`||
163
-
|[`rpc.grpc.response.metadata.<key>`](/docs/registry/attributes/rpc.md)| string[]| gRPC response metadata, `<key>` being the normalized gRPC Metadata key (lowercase), the value being the metadata values. [11]|`["attribute_value"]`|`Opt-In`||
164
+
|[`network.protocol.name`](/docs/registry/attributes/network.md)| string |[OSI application layer](https://wikipedia.org/wiki/Application_layer) or non-OSI equivalent. [6]|`http`|`Recommended`||
165
+
|[`network.protocol.version`](/docs/registry/attributes/network.md)| string | The actual version of the protocol used for network communication. [7]|`1.1`; `2`|`Recommended`||
166
+
|[`network.transport`](/docs/registry/attributes/network.md)| string |[OSI transport layer](https://wikipedia.org/wiki/Transport_layer) or [inter-process communication method](https://wikipedia.org/wiki/Inter-process_communication). [8]|`tcp`; `udp`|`Recommended`||
167
+
|[`network.type`](/docs/registry/attributes/network.md)| string |[OSI network layer](https://wikipedia.org/wiki/Network_layer) or non-OSI equivalent. [9]|`ipv4`; `ipv6`|`Recommended`||
168
+
|[`rpc.method`](/docs/registry/attributes/rpc.md)| string | This is the logical name of the method from the RPC interface perspective. [10]|`exampleMethod`|`Recommended`||
169
+
|[`rpc.service`](/docs/registry/attributes/rpc.md)| string | The full (logical) name of the service being called, including its package name, if applicable. [11]|`myservice.EchoService`|`Recommended`||
170
+
|[`rpc.grpc.request.metadata.<key>`](/docs/registry/attributes/rpc.md)| string[]| gRPC request metadata, `<key>` being the normalized gRPC Metadata key (lowercase), the value being the metadata values. [12]|`["1.2.3.4", "1.2.3.5"]`|`Opt-In`||
171
+
|[`rpc.grpc.response.metadata.<key>`](/docs/registry/attributes/rpc.md)| string[]| gRPC response metadata, `<key>` being the normalized gRPC Metadata key (lowercase), the value being the metadata values. [13]|`["attribute_value"]`|`Opt-In`||
164
172
165
173
**[1]`server.address`:** 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.
166
174
@@ -172,25 +180,29 @@ This span represents an incoming Remote Procedure Call (RPC).
172
180
173
181
**[5]`client.port`:** When observed from the server side, and when communicating through an intermediary, `client.port` SHOULD represent the client port behind any intermediaries, for example proxies, if it's available.
174
182
175
-
**[6]`network.transport`:** The value SHOULD be normalized to lowercase.
183
+
**[6]`network.protocol.name`:** The value SHOULD be normalized to lowercase.
184
+
185
+
**[7]`network.protocol.version`:** If protocol version is subject to negotiation (for example using [ALPN](https://www.rfc-editor.org/rfc/rfc7301.html)), this attribute SHOULD be set to the negotiated version. If the actual protocol version is not known, this attribute SHOULD NOT be set.
186
+
187
+
**[8]`network.transport`:** The value SHOULD be normalized to lowercase.
176
188
177
189
Consider always setting the transport when setting a port number, since
178
190
a port number is ambiguous without knowing the transport. For example
179
191
different processes could be listening on TCP port 12345 and UDP port 12345.
180
192
181
-
**[7]`network.type`:** The value SHOULD be normalized to lowercase.
193
+
**[9]`network.type`:** The value SHOULD be normalized to lowercase.
182
194
183
-
**[8]`rpc.method`:** 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.name` 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).
195
+
**[10]`rpc.method`:** 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.name` 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).
184
196
185
-
**[9]`rpc.service`:** 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).
197
+
**[11]`rpc.service`:** 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).
186
198
187
-
**[10]`rpc.grpc.request.metadata.<key>`:** Instrumentations SHOULD require an explicit configuration of which metadata values are to be captured.
199
+
**[12]`rpc.grpc.request.metadata.<key>`:** Instrumentations SHOULD require an explicit configuration of which metadata values are to be captured.
188
200
Including all request metadata values can be a security risk - explicit configuration helps avoid leaking sensitive information.
189
201
190
202
For example, a property `my-custom-key` with value `["1.2.3.4", "1.2.3.5"]` SHOULD be recorded as
191
203
`rpc.grpc.request.metadata.my-custom-key` attribute with value `["1.2.3.4", "1.2.3.5"]`
192
204
193
-
**[11]`rpc.grpc.response.metadata.<key>`:** Instrumentations SHOULD require an explicit configuration of which metadata values are to be captured.
205
+
**[13]`rpc.grpc.response.metadata.<key>`:** Instrumentations SHOULD require an explicit configuration of which metadata values are to be captured.
194
206
Including all response metadata values can be a security risk - explicit configuration helps avoid leaking sensitive information.
195
207
196
208
For example, a property `my-custom-key` with value `["attribute_value"]` SHOULD be recorded as
0 commit comments