Skip to content

Commit 3be2bcb

Browse files
ChrsMarkLiudmila Molkovatrisch-me
authored
Replace system.network.state with network.connection.state (#1632)
Signed-off-by: ChrsMark <[email protected]> Co-authored-by: Liudmila Molkova <[email protected]> Co-authored-by: Alexandra Konrad <[email protected]>
1 parent a596f19 commit 3be2bcb

File tree

9 files changed

+183
-106
lines changed

9 files changed

+183
-106
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Use this changelog template to create an entry for release notes.
2+
#
3+
# If your change doesn't affect end users you should instead start
4+
# your pull request title with [chore] or use the "Skip Changelog" label.
5+
6+
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
7+
change_type: breaking
8+
9+
# The name of the area of concern in the attributes-registry, (e.g. http, cloud, db)
10+
component: system
11+
12+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
13+
note: Replace `system.network.state` with `network.connection.state`
14+
15+
# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
16+
# The values here must be integers.
17+
issues: [308]
18+
19+
# (Optional) One or more lines of additional information to render under the primary note.
20+
# These lines will be padded with 2 spaces and then inserted directly into the document.
21+
# Use pipe (|) for multiline entries.
22+
subtext:

docs/attributes-registry/network.md

Lines changed: 31 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ These attributes may be used for any network related operation.
1919
| <a id="network-carrier-mcc" href="#network-carrier-mcc">`network.carrier.mcc`</a> | string | The mobile carrier country code. | `310` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
2020
| <a id="network-carrier-mnc" href="#network-carrier-mnc">`network.carrier.mnc`</a> | string | The mobile carrier network code. | `001` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
2121
| <a id="network-carrier-name" href="#network-carrier-name">`network.carrier.name`</a> | string | The name of the mobile carrier. | `sprint` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
22+
| <a id="network-connection-state" href="#network-connection-state">`network.connection.state`</a> | string | The state of network connection [1] | `close_wait` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
2223
| <a id="network-connection-subtype" href="#network-connection-subtype">`network.connection.subtype`</a> | string | This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection. | `LTE` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
2324
| <a id="network-connection-type" href="#network-connection-type">`network.connection.type`</a> | string | The internet connection type. | `wifi` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
2425
| <a id="network-interface-name" href="#network-interface-name">`network.interface.name`</a> | string | The network interface name. | `lo`; `eth0` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
@@ -27,22 +28,42 @@ These attributes may be used for any network related operation.
2728
| <a id="network-local-port" href="#network-local-port">`network.local.port`</a> | int | Local port number of the network connection. | `65123` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
2829
| <a id="network-peer-address" href="#network-peer-address">`network.peer.address`</a> | string | Peer address of the network connection - IP address or Unix domain socket name. | `10.1.2.80`; `/tmp/my.sock` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
2930
| <a id="network-peer-port" href="#network-peer-port">`network.peer.port`</a> | int | Peer port number of the network connection. | `65123` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
30-
| <a id="network-protocol-name" href="#network-protocol-name">`network.protocol.name`</a> | string | [OSI application layer](https://wikipedia.org/wiki/Application_layer) or non-OSI equivalent. [1] | `amqp`; `http`; `mqtt` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
31-
| <a id="network-protocol-version" href="#network-protocol-version">`network.protocol.version`</a> | string | The actual version of the protocol used for network communication. [2] | `1.1`; `2` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
32-
| <a id="network-transport" href="#network-transport">`network.transport`</a> | string | [OSI transport layer](https://wikipedia.org/wiki/Transport_layer) or [inter-process communication method](https://wikipedia.org/wiki/Inter-process_communication). [3] | `tcp`; `udp` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
33-
| <a id="network-type" href="#network-type">`network.type`</a> | string | [OSI network layer](https://wikipedia.org/wiki/Network_layer) or non-OSI equivalent. [4] | `ipv4`; `ipv6` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
31+
| <a id="network-protocol-name" href="#network-protocol-name">`network.protocol.name`</a> | string | [OSI application layer](https://wikipedia.org/wiki/Application_layer) or non-OSI equivalent. [2] | `amqp`; `http`; `mqtt` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
32+
| <a id="network-protocol-version" href="#network-protocol-version">`network.protocol.version`</a> | string | The actual version of the protocol used for network communication. [3] | `1.1`; `2` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
33+
| <a id="network-transport" href="#network-transport">`network.transport`</a> | string | [OSI transport layer](https://wikipedia.org/wiki/Transport_layer) or [inter-process communication method](https://wikipedia.org/wiki/Inter-process_communication). [4] | `tcp`; `udp` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
34+
| <a id="network-type" href="#network-type">`network.type`</a> | string | [OSI network layer](https://wikipedia.org/wiki/Network_layer) or non-OSI equivalent. [5] | `ipv4`; `ipv6` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
3435

35-
**[1] `network.protocol.name`:** The value SHOULD be normalized to lowercase.
36+
**[1] `network.connection.state`:** Connection states are defined as part of the [rfc9293](https://datatracker.ietf.org/doc/html/rfc9293#section-3.3.2)
3637

37-
**[2] `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.
38+
**[2] `network.protocol.name`:** The value SHOULD be normalized to lowercase.
3839

39-
**[3] `network.transport`:** The value SHOULD be normalized to lowercase.
40+
**[3] `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.
41+
42+
**[4] `network.transport`:** The value SHOULD be normalized to lowercase.
4043

4144
Consider always setting the transport when setting a port number, since
4245
a port number is ambiguous without knowing the transport. For example
4346
different processes could be listening on TCP port 12345 and UDP port 12345.
4447

45-
**[4] `network.type`:** The value SHOULD be normalized to lowercase.
48+
**[5] `network.type`:** The value SHOULD be normalized to lowercase.
49+
50+
---
51+
52+
`network.connection.state` 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.
53+
54+
| Value | Description | Stability |
55+
|---|---|---|
56+
| `close_wait` | close_wait | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
57+
| `closed` | closed | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
58+
| `closing` | closing | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
59+
| `established` | established | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
60+
| `fin_wait_1` | fin_wait_1 | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
61+
| `fin_wait_2` | fin_wait_2 | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
62+
| `last_ack` | last_ack | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
63+
| `listen` | listen | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
64+
| `syn_received` | syn_received | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
65+
| `syn_sent` | syn_sent | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
66+
| `time_wait` | time_wait | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
4667

4768
---
4869

@@ -152,10 +173,10 @@ These attributes may be used for any network related operation.
152173

153174
| Value | Description | Stability |
154175
|---|---|---|
155-
| `inproc` | In-process communication. [5] | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
176+
| `inproc` | In-process communication. [6] | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
156177
| `ip_tcp` | ip_tcp | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
157178
| `ip_udp` | ip_udp | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
158179
| `other` | Something else (non IP-based). | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
159180
| `pipe` | Named or anonymous pipe. | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
160181

161-
**[5]:** Signals that there is only in-process communication not using a "real" network protocol in cases where network attributes would normally be expected. Usually all other network attributes can be left out in that case.
182+
**[6]:** Signals that there is only in-process communication not using a "real" network protocol in cases where network attributes would normally be expected. Usually all other network attributes can be left out in that case.

docs/attributes-registry/system.md

Lines changed: 20 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
- [System CPU Attributes](#system-cpu-attributes)
1111
- [Filesystem Attributes](#filesystem-attributes)
1212
- [System Memory Attributes](#system-memory-attributes)
13-
- [System Network Attributes](#system-network-attributes)
1413
- [System Paging Attributes](#system-paging-attributes)
1514
- [System Process Attributes](#system-process-attributes)
1615
- [Deprecated System Attributes](#deprecated-system-attributes)
@@ -85,33 +84,6 @@ Describes System Memory attributes
8584
| `shared` | shared | ![Deprecated](https://img.shields.io/badge/-deprecated-red)<br>Removed, report shared memory usage with `metric.system.memory.shared` metric |
8685
| `used` | used | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
8786

88-
## System Network Attributes
89-
90-
Describes Network attributes
91-
92-
| Attribute | Type | Description | Examples | Stability |
93-
|---|---|---|---|---|
94-
| <a id="system-network-state" href="#system-network-state">`system.network.state`</a> | string | A stateless protocol MUST NOT set this attribute | `close_wait` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
95-
96-
---
97-
98-
`system.network.state` 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.
99-
100-
| Value | Description | Stability |
101-
|---|---|---|
102-
| `close` | close | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
103-
| `close_wait` | close_wait | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
104-
| `closing` | closing | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
105-
| `delete` | delete | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
106-
| `established` | established | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
107-
| `fin_wait_1` | fin_wait_1 | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
108-
| `fin_wait_2` | fin_wait_2 | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
109-
| `last_ack` | last_ack | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
110-
| `listen` | listen | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
111-
| `syn_recv` | syn_recv | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
112-
| `syn_sent` | syn_sent | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
113-
| `time_wait` | time_wait | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
114-
11587
## System Paging Attributes
11688

11789
Describes System Memory Paging attributes
@@ -175,6 +147,7 @@ Deprecated system attributes.
175147
| Attribute | Type | Description | Examples | Stability |
176148
|---|---|---|---|---|
177149
| <a id="system-cpu-state" href="#system-cpu-state">`system.cpu.state`</a> | string | Deprecated, use `cpu.mode` instead. | `idle`; `interrupt` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)<br>Replaced by `cpu.mode` |
150+
| <a id="system-network-state" href="#system-network-state">`system.network.state`</a> | string | Deprecated, use `network.connection.state` instead. | `close_wait` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)<br>Removed, report network connection state with `network.connection.state` attribute |
178151
| <a id="system-processes-status" href="#system-processes-status">`system.processes.status`</a> | string | Deprecated, use `system.process.status` instead. | `running` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)<br>Replaced by `system.process.status`. |
179152

180153
---
@@ -193,6 +166,25 @@ Deprecated system attributes.
193166

194167
---
195168

169+
`system.network.state` 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.
170+
171+
| Value | Description | Stability |
172+
|---|---|---|
173+
| `close` | close | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
174+
| `close_wait` | close_wait | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
175+
| `closing` | closing | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
176+
| `delete` | delete | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
177+
| `established` | established | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
178+
| `fin_wait_1` | fin_wait_1 | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
179+
| `fin_wait_2` | fin_wait_2 | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
180+
| `last_ack` | last_ack | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
181+
| `listen` | listen | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
182+
| `syn_recv` | syn_recv | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
183+
| `syn_sent` | syn_sent | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
184+
| `time_wait` | time_wait | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
185+
186+
---
187+
196188
`system.processes.status` 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.
197189

198190
| Value | Description | Stability |

docs/system/system-metrics.md

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1041,47 +1041,48 @@ This metric is [recommended][MetricRecommended].
10411041

10421042
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
10431043
|---|---|---|---|---|---|
1044+
| [`network.connection.state`](/docs/attributes-registry/network.md) | string | The state of network connection [1] | `close_wait` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
10441045
| [`network.interface.name`](/docs/attributes-registry/network.md) | string | The network interface name. | `lo`; `eth0` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
1045-
| [`network.transport`](/docs/attributes-registry/network.md) | string | [OSI transport layer](https://wikipedia.org/wiki/Transport_layer) or [inter-process communication method](https://wikipedia.org/wiki/Inter-process_communication). [1] | `tcp`; `udp` | `Recommended` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
1046-
| [`system.network.state`](/docs/attributes-registry/system.md) | string | A stateless protocol MUST NOT set this attribute | `close_wait` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
1046+
| [`network.transport`](/docs/attributes-registry/network.md) | string | [OSI transport layer](https://wikipedia.org/wiki/Transport_layer) or [inter-process communication method](https://wikipedia.org/wiki/Inter-process_communication). [2] | `tcp`; `udp` | `Recommended` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
10471047

1048-
**[1] `network.transport`:** The value SHOULD be normalized to lowercase.
1048+
**[1] `network.connection.state`:** Connection states are defined as part of the [rfc9293](https://datatracker.ietf.org/doc/html/rfc9293#section-3.3.2)
1049+
1050+
**[2] `network.transport`:** The value SHOULD be normalized to lowercase.
10491051

10501052
Consider always setting the transport when setting a port number, since
10511053
a port number is ambiguous without knowing the transport. For example
10521054
different processes could be listening on TCP port 12345 and UDP port 12345.
10531055

10541056
---
10551057

1056-
`network.transport` 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.
1057-
1058-
| Value | Description | Stability |
1059-
|---|---|---|
1060-
| `pipe` | Named or anonymous pipe. | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
1061-
| `quic` | QUIC | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
1062-
| `tcp` | TCP | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
1063-
| `udp` | UDP | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
1064-
| `unix` | Unix domain socket | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
1065-
1066-
---
1067-
1068-
`system.network.state` 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.
1058+
`network.connection.state` 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.
10691059

10701060
| Value | Description | Stability |
10711061
|---|---|---|
1072-
| `close` | close | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
10731062
| `close_wait` | close_wait | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
1063+
| `closed` | closed | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
10741064
| `closing` | closing | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
1075-
| `delete` | delete | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
10761065
| `established` | established | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
10771066
| `fin_wait_1` | fin_wait_1 | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
10781067
| `fin_wait_2` | fin_wait_2 | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
10791068
| `last_ack` | last_ack | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
10801069
| `listen` | listen | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
1081-
| `syn_recv` | syn_recv | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
1070+
| `syn_received` | syn_received | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
10821071
| `syn_sent` | syn_sent | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
10831072
| `time_wait` | time_wait | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
10841073

1074+
---
1075+
1076+
`network.transport` 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.
1077+
1078+
| Value | Description | Stability |
1079+
|---|---|---|
1080+
| `pipe` | Named or anonymous pipe. | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
1081+
| `quic` | QUIC | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
1082+
| `tcp` | TCP | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
1083+
| `udp` | UDP | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
1084+
| `unix` | Unix domain socket | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
1085+
10851086
<!-- markdownlint-restore -->
10861087
<!-- prettier-ignore-end -->
10871088
<!-- END AUTOGENERATED TEXT -->

0 commit comments

Comments
 (0)