From 1f371af2b564866b576e27190a5fb7d236ee5f8b Mon Sep 17 00:00:00 2001 From: ChrsMark Date: Fri, 29 Nov 2024 12:08:14 +0200 Subject: [PATCH 1/6] Replace system.network.state with network.connection.state Signed-off-by: ChrsMark --- .chloggen/fix_system_net_state.yaml | 22 +++++++++++++++ docs/attributes-registry/network.md | 20 ++++++++++++++ docs/attributes-registry/system.md | 2 +- docs/system/system-metrics.md | 28 +++++++++---------- model/network/registry.yaml | 42 +++++++++++++++++++++++++++++ model/system/metrics.yaml | 2 +- model/system/registry.yaml | 1 + schema-next.yaml | 8 ++++++ 8 files changed, 109 insertions(+), 16 deletions(-) create mode 100755 .chloggen/fix_system_net_state.yaml diff --git a/.chloggen/fix_system_net_state.yaml b/.chloggen/fix_system_net_state.yaml new file mode 100755 index 0000000000..0176d27b51 --- /dev/null +++ b/.chloggen/fix_system_net_state.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: breaking + +# The name of the area of concern in the attributes-registry, (e.g. http, cloud, db) +component: system + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Replace `system.network.state` with `network.connection.state` + +# 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: [308] + +# (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: diff --git a/docs/attributes-registry/network.md b/docs/attributes-registry/network.md index 9f5a64ee29..a74b55fa10 100644 --- a/docs/attributes-registry/network.md +++ b/docs/attributes-registry/network.md @@ -19,6 +19,7 @@ These attributes may be used for any network related operation. | `network.carrier.mcc` | string | The mobile carrier country code. | `310` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `network.carrier.mnc` | string | The mobile carrier network code. | `001` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `network.carrier.name` | string | The name of the mobile carrier. | `sprint` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `network.connection.state` | string | A stateless protocol MUST NOT set this attribute | `close_wait` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `network.connection.subtype` | 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) | | `network.connection.type` | string | The internet connection type. | `wifi` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `network.interface.name` | string | The network interface name. | `lo`; `eth0` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | @@ -46,6 +47,25 @@ different processes could be listening on TCP port 12345 and UDP port 12345. --- +`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. + +| Value | Description | Stability | +|---|---|---| +| `close` | close | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `close_wait` | close_wait | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `closing` | closing | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `delete` | delete | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `established` | established | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `fin_wait_1` | fin_wait_1 | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `fin_wait_2` | fin_wait_2 | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `last_ack` | last_ack | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `listen` | listen | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `syn_recv` | syn_recv | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `syn_sent` | syn_sent | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `time_wait` | time_wait | ![Experimental](https://img.shields.io/badge/-experimental-blue) | + +--- + `network.connection.subtype` 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. | Value | Description | Stability | diff --git a/docs/attributes-registry/system.md b/docs/attributes-registry/system.md index f327b42c42..c818fd2d7e 100644 --- a/docs/attributes-registry/system.md +++ b/docs/attributes-registry/system.md @@ -91,7 +91,7 @@ Describes Network attributes | Attribute | Type | Description | Examples | Stability | |---|---|---|---|---| -| `system.network.state` | string | A stateless protocol MUST NOT set this attribute | `close_wait` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `system.network.state` | string | A stateless protocol MUST NOT set this attribute | `close_wait` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)
Removed, report network connection state with `network.connection.state` attribute | --- diff --git a/docs/system/system-metrics.md b/docs/system/system-metrics.md index 61b65cd13c..ab7785b1af 100644 --- a/docs/system/system-metrics.md +++ b/docs/system/system-metrics.md @@ -1041,9 +1041,9 @@ This metric is [recommended][MetricRecommended]. | Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| +| [`network.connection.state`](/docs/attributes-registry/network.md) | string | A stateless protocol MUST NOT set this attribute | `close_wait` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | [`network.interface.name`](/docs/attributes-registry/network.md) | string | The network interface name. | `lo`; `eth0` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | [`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) | -| [`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) | **[1] `network.transport`:** The value SHOULD be normalized to lowercase. @@ -1053,19 +1053,7 @@ different processes could be listening on TCP port 12345 and UDP port 12345. --- -`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. - -| Value | Description | Stability | -|---|---|---| -| `pipe` | Named or anonymous pipe. | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | -| `quic` | QUIC | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `tcp` | TCP | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | -| `udp` | UDP | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | -| `unix` | Unix domain socket | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | - ---- - -`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. +`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. | Value | Description | Stability | |---|---|---| @@ -1082,6 +1070,18 @@ different processes could be listening on TCP port 12345 and UDP port 12345. | `syn_sent` | syn_sent | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `time_wait` | time_wait | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +--- + +`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. + +| Value | Description | Stability | +|---|---|---| +| `pipe` | Named or anonymous pipe. | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | +| `quic` | QUIC | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `tcp` | TCP | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | +| `udp` | UDP | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | +| `unix` | Unix domain socket | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | + diff --git a/model/network/registry.yaml b/model/network/registry.yaml index 3c42865fe1..37d8eebaf7 100644 --- a/model/network/registry.yaml +++ b/model/network/registry.yaml @@ -236,3 +236,45 @@ groups: type: string brief: 'The network interface name.' examples: [ 'lo', 'eth0' ] + - id: network.connection.state + type: + members: + - id: close + value: 'close' + stability: experimental + - id: close_wait + value: 'close_wait' + stability: experimental + - id: closing + value: 'closing' + stability: experimental + - id: delete + value: 'delete' + stability: experimental + - id: established + value: 'established' + stability: experimental + - id: fin_wait_1 + value: 'fin_wait_1' + stability: experimental + - id: fin_wait_2 + value: 'fin_wait_2' + stability: experimental + - id: last_ack + value: 'last_ack' + stability: experimental + - id: listen + value: 'listen' + stability: experimental + - id: syn_recv + value: 'syn_recv' + stability: experimental + - id: syn_sent + value: 'syn_sent' + stability: experimental + - id: time_wait + value: 'time_wait' + stability: experimental + stability: experimental + brief: "A stateless protocol MUST NOT set this attribute" + examples: [ "close_wait" ] diff --git a/model/system/metrics.yaml b/model/system/metrics.yaml index 2aa2429d32..0e202d86b4 100644 --- a/model/system/metrics.yaml +++ b/model/system/metrics.yaml @@ -354,7 +354,7 @@ groups: unit: "{connection}" attributes: - ref: network.interface.name - - ref: system.network.state + - ref: network.connection.state - ref: network.transport # system.process.* metrics diff --git a/model/system/registry.yaml b/model/system/registry.yaml index db0a9770f5..c907956d0a 100644 --- a/model/system/registry.yaml +++ b/model/system/registry.yaml @@ -152,6 +152,7 @@ groups: brief: "Describes Network attributes" attributes: - id: system.network.state + deprecated: 'Removed, report network connection state with `network.connection.state` attribute' type: members: - id: close diff --git a/schema-next.yaml b/schema-next.yaml index 6fa7a3fb06..30f909661a 100644 --- a/schema-next.yaml +++ b/schema-next.yaml @@ -2,6 +2,14 @@ file_format: 1.1.0 schema_url: https://opentelemetry.io/schemas/next versions: next: + metrics: + changes: + # https://github.com/open-telemetry/semantic-conventions/pull/1632 + - rename_attributes: + attribute_map: + system.network.state: network.connection.state + apply_to_metrics: + - system.network.connections 1.29.0: all: changes: From 74f3790c90acae6f3489bf9ca462cc8f694b5ece Mon Sep 17 00:00:00 2001 From: ChrsMark Date: Fri, 29 Nov 2024 14:09:21 +0200 Subject: [PATCH 2/6] fix deprecated and brief Signed-off-by: ChrsMark --- docs/attributes-registry/network.md | 24 ++++----- docs/attributes-registry/system.md | 48 ++++++++---------- docs/system/system-metrics.md | 8 +-- model/network/registry.yaml | 3 +- .../deprecated/registry-deprecated.yaml | 43 ++++++++++++++++ model/system/registry.yaml | 49 ------------------- 6 files changed, 83 insertions(+), 92 deletions(-) diff --git a/docs/attributes-registry/network.md b/docs/attributes-registry/network.md index a74b55fa10..f67c660dfc 100644 --- a/docs/attributes-registry/network.md +++ b/docs/attributes-registry/network.md @@ -19,7 +19,7 @@ These attributes may be used for any network related operation. | `network.carrier.mcc` | string | The mobile carrier country code. | `310` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `network.carrier.mnc` | string | The mobile carrier network code. | `001` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `network.carrier.name` | string | The name of the mobile carrier. | `sprint` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `network.connection.state` | string | A stateless protocol MUST NOT set this attribute | `close_wait` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `network.connection.state` | string | The state of network connection [1] | `close_wait` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `network.connection.subtype` | 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) | | `network.connection.type` | string | The internet connection type. | `wifi` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `network.interface.name` | string | The network interface name. | `lo`; `eth0` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | @@ -28,22 +28,24 @@ These attributes may be used for any network related operation. | `network.local.port` | int | Local port number of the network connection. | `65123` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | | `network.peer.address` | 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) | | `network.peer.port` | int | Peer port number of the network connection. | `65123` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | -| `network.protocol.name` | 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) | -| `network.protocol.version` | string | The actual version of the protocol used for network communication. [2] | `1.1`; `2` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | -| `network.transport` | 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) | -| `network.type` | 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) | +| `network.protocol.name` | 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) | +| `network.protocol.version` | string | The actual version of the protocol used for network communication. [3] | `1.1`; `2` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | +| `network.transport` | 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) | +| `network.type` | 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) | -**[1] `network.protocol.name`:** The value SHOULD be normalized to lowercase. +**[1] `network.connection.state`:** A stateless protocol MUST NOT set this attribute -**[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. +**[2] `network.protocol.name`:** The value SHOULD be normalized to lowercase. -**[3] `network.transport`:** The value SHOULD be normalized to lowercase. +**[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. + +**[4] `network.transport`:** The value SHOULD be normalized to lowercase. Consider always setting the transport when setting a port number, since a port number is ambiguous without knowing the transport. For example different processes could be listening on TCP port 12345 and UDP port 12345. -**[4] `network.type`:** The value SHOULD be normalized to lowercase. +**[5] `network.type`:** The value SHOULD be normalized to lowercase. --- @@ -172,10 +174,10 @@ These attributes may be used for any network related operation. | Value | Description | Stability | |---|---|---| -| `inproc` | In-process communication. [5] | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `inproc` | In-process communication. [6] | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `ip_tcp` | ip_tcp | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `ip_udp` | ip_udp | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `other` | Something else (non IP-based). | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `pipe` | Named or anonymous pipe. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -**[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. +**[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. diff --git a/docs/attributes-registry/system.md b/docs/attributes-registry/system.md index c818fd2d7e..1a7a534537 100644 --- a/docs/attributes-registry/system.md +++ b/docs/attributes-registry/system.md @@ -10,7 +10,6 @@ - [System CPU Attributes](#system-cpu-attributes) - [Filesystem Attributes](#filesystem-attributes) - [System Memory Attributes](#system-memory-attributes) -- [System Network Attributes](#system-network-attributes) - [System Paging Attributes](#system-paging-attributes) - [System Process Attributes](#system-process-attributes) - [Deprecated System Attributes](#deprecated-system-attributes) @@ -85,33 +84,6 @@ Describes System Memory attributes | `shared` | shared | ![Deprecated](https://img.shields.io/badge/-deprecated-red)
Removed, report shared memory usage with `metric.system.memory.shared` metric | | `used` | used | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -## System Network Attributes - -Describes Network attributes - -| Attribute | Type | Description | Examples | Stability | -|---|---|---|---|---| -| `system.network.state` | string | A stateless protocol MUST NOT set this attribute | `close_wait` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)
Removed, report network connection state with `network.connection.state` attribute | - ---- - -`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. - -| Value | Description | Stability | -|---|---|---| -| `close` | close | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `close_wait` | close_wait | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `closing` | closing | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `delete` | delete | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `established` | established | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `fin_wait_1` | fin_wait_1 | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `fin_wait_2` | fin_wait_2 | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `last_ack` | last_ack | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `listen` | listen | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `syn_recv` | syn_recv | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `syn_sent` | syn_sent | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `time_wait` | time_wait | ![Experimental](https://img.shields.io/badge/-experimental-blue) | - ## System Paging Attributes Describes System Memory Paging attributes @@ -175,6 +147,7 @@ Deprecated system attributes. | Attribute | Type | Description | Examples | Stability | |---|---|---|---|---| | `system.cpu.state` | string | Deprecated, use `cpu.mode` instead. | `idle`; `interrupt` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)
Replaced by `cpu.mode` | +| `system.network.state` | string | A stateless protocol MUST NOT set this attribute | `close_wait` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)
Removed, report network connection state with `network.connection.state` attribute | | `system.processes.status` | string | Deprecated, use `system.process.status` instead. | `running` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)
Replaced by `system.process.status`. | --- @@ -193,6 +166,25 @@ Deprecated system attributes. --- +`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. + +| Value | Description | Stability | +|---|---|---| +| `close` | close | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `close_wait` | close_wait | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `closing` | closing | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `delete` | delete | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `established` | established | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `fin_wait_1` | fin_wait_1 | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `fin_wait_2` | fin_wait_2 | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `last_ack` | last_ack | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `listen` | listen | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `syn_recv` | syn_recv | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `syn_sent` | syn_sent | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `time_wait` | time_wait | ![Experimental](https://img.shields.io/badge/-experimental-blue) | + +--- + `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. | Value | Description | Stability | diff --git a/docs/system/system-metrics.md b/docs/system/system-metrics.md index ab7785b1af..376f2e7c12 100644 --- a/docs/system/system-metrics.md +++ b/docs/system/system-metrics.md @@ -1041,11 +1041,13 @@ This metric is [recommended][MetricRecommended]. | Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| -| [`network.connection.state`](/docs/attributes-registry/network.md) | string | A stateless protocol MUST NOT set this attribute | `close_wait` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| [`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) | | [`network.interface.name`](/docs/attributes-registry/network.md) | string | The network interface name. | `lo`; `eth0` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| [`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) | +| [`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) | -**[1] `network.transport`:** The value SHOULD be normalized to lowercase. +**[1] `network.connection.state`:** A stateless protocol MUST NOT set this attribute + +**[2] `network.transport`:** The value SHOULD be normalized to lowercase. Consider always setting the transport when setting a port number, since a port number is ambiguous without knowing the transport. For example diff --git a/model/network/registry.yaml b/model/network/registry.yaml index 37d8eebaf7..0b217bfa5b 100644 --- a/model/network/registry.yaml +++ b/model/network/registry.yaml @@ -276,5 +276,6 @@ groups: value: 'time_wait' stability: experimental stability: experimental - brief: "A stateless protocol MUST NOT set this attribute" + brief: "The state of network connection" + note: "A stateless protocol MUST NOT set this attribute" examples: [ "close_wait" ] diff --git a/model/system/deprecated/registry-deprecated.yaml b/model/system/deprecated/registry-deprecated.yaml index 70ea9583ae..efaccf10a8 100644 --- a/model/system/deprecated/registry-deprecated.yaml +++ b/model/system/deprecated/registry-deprecated.yaml @@ -51,3 +51,46 @@ groups: stability: experimental deprecated: 'Replaced by `cpu.mode`' examples: [ "idle", "interrupt" ] + - id: system.network.state + deprecated: 'Removed, report network connection state with `network.connection.state` attribute' + type: + members: + - id: close + value: 'close' + stability: experimental + - id: close_wait + value: 'close_wait' + stability: experimental + - id: closing + value: 'closing' + stability: experimental + - id: delete + value: 'delete' + stability: experimental + - id: established + value: 'established' + stability: experimental + - id: fin_wait_1 + value: 'fin_wait_1' + stability: experimental + - id: fin_wait_2 + value: 'fin_wait_2' + stability: experimental + - id: last_ack + value: 'last_ack' + stability: experimental + - id: listen + value: 'listen' + stability: experimental + - id: syn_recv + value: 'syn_recv' + stability: experimental + - id: syn_sent + value: 'syn_sent' + stability: experimental + - id: time_wait + value: 'time_wait' + stability: experimental + stability: experimental + brief: "A stateless protocol MUST NOT set this attribute" + examples: [ "close_wait" ] diff --git a/model/system/registry.yaml b/model/system/registry.yaml index c907956d0a..4325b0059c 100644 --- a/model/system/registry.yaml +++ b/model/system/registry.yaml @@ -145,55 +145,6 @@ groups: stability: experimental brief: "The filesystem mount path" examples: ["/mnt/data"] - # System-specific network attributes - - id: registry.system.network - type: attribute_group - display_name: System Network Attributes - brief: "Describes Network attributes" - attributes: - - id: system.network.state - deprecated: 'Removed, report network connection state with `network.connection.state` attribute' - type: - members: - - id: close - value: 'close' - stability: experimental - - id: close_wait - value: 'close_wait' - stability: experimental - - id: closing - value: 'closing' - stability: experimental - - id: delete - value: 'delete' - stability: experimental - - id: established - value: 'established' - stability: experimental - - id: fin_wait_1 - value: 'fin_wait_1' - stability: experimental - - id: fin_wait_2 - value: 'fin_wait_2' - stability: experimental - - id: last_ack - value: 'last_ack' - stability: experimental - - id: listen - value: 'listen' - stability: experimental - - id: syn_recv - value: 'syn_recv' - stability: experimental - - id: syn_sent - value: 'syn_sent' - stability: experimental - - id: time_wait - value: 'time_wait' - stability: experimental - stability: experimental - brief: "A stateless protocol MUST NOT set this attribute" - examples: ["close_wait"] # system.process.* attribute group - id: registry.system.process type: attribute_group From 576493af7a77f84af8687f8ef8869015e35c4d54 Mon Sep 17 00:00:00 2001 From: ChrsMark Date: Tue, 3 Dec 2024 14:43:36 +0200 Subject: [PATCH 3/6] fix schema next Signed-off-by: ChrsMark --- schema-next.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/schema-next.yaml b/schema-next.yaml index 30f909661a..1a429b3724 100644 --- a/schema-next.yaml +++ b/schema-next.yaml @@ -2,14 +2,12 @@ file_format: 1.1.0 schema_url: https://opentelemetry.io/schemas/next versions: next: - metrics: + all: changes: # https://github.com/open-telemetry/semantic-conventions/pull/1632 - rename_attributes: attribute_map: system.network.state: network.connection.state - apply_to_metrics: - - system.network.connections 1.29.0: all: changes: From 69ff6f083558ae8ae15a4706758f2409ad7227d6 Mon Sep 17 00:00:00 2001 From: ChrsMark Date: Fri, 13 Dec 2024 11:48:43 +0200 Subject: [PATCH 4/6] align with rfc9293 Signed-off-by: ChrsMark --- docs/attributes-registry/network.md | 7 +++---- docs/system/system-metrics.md | 7 +++---- model/network/registry.yaml | 13 +++++-------- 3 files changed, 11 insertions(+), 16 deletions(-) diff --git a/docs/attributes-registry/network.md b/docs/attributes-registry/network.md index f67c660dfc..aeefdb1038 100644 --- a/docs/attributes-registry/network.md +++ b/docs/attributes-registry/network.md @@ -33,7 +33,7 @@ These attributes may be used for any network related operation. | `network.transport` | 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) | | `network.type` | 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) | -**[1] `network.connection.state`:** A stateless protocol MUST NOT set this attribute +**[1] `network.connection.state`:** Connection states are defined as part of the [rfc9293](https://datatracker.ietf.org/doc/html/rfc9293#section-3.3.2) **[2] `network.protocol.name`:** The value SHOULD be normalized to lowercase. @@ -53,16 +53,15 @@ different processes could be listening on TCP port 12345 and UDP port 12345. | Value | Description | Stability | |---|---|---| -| `close` | close | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `close_wait` | close_wait | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `closed` | closed | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `closing` | closing | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `delete` | delete | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `established` | established | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `fin_wait_1` | fin_wait_1 | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `fin_wait_2` | fin_wait_2 | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `last_ack` | last_ack | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `listen` | listen | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `syn_recv` | syn_recv | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `syn_received` | syn_received | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `syn_sent` | syn_sent | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `time_wait` | time_wait | ![Experimental](https://img.shields.io/badge/-experimental-blue) | diff --git a/docs/system/system-metrics.md b/docs/system/system-metrics.md index 376f2e7c12..3404b1d54d 100644 --- a/docs/system/system-metrics.md +++ b/docs/system/system-metrics.md @@ -1045,7 +1045,7 @@ This metric is [recommended][MetricRecommended]. | [`network.interface.name`](/docs/attributes-registry/network.md) | string | The network interface name. | `lo`; `eth0` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | [`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) | -**[1] `network.connection.state`:** A stateless protocol MUST NOT set this attribute +**[1] `network.connection.state`:** Connection states are defined as part of the [rfc9293](https://datatracker.ietf.org/doc/html/rfc9293#section-3.3.2) **[2] `network.transport`:** The value SHOULD be normalized to lowercase. @@ -1059,16 +1059,15 @@ different processes could be listening on TCP port 12345 and UDP port 12345. | Value | Description | Stability | |---|---|---| -| `close` | close | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `close_wait` | close_wait | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `closed` | closed | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `closing` | closing | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `delete` | delete | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `established` | established | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `fin_wait_1` | fin_wait_1 | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `fin_wait_2` | fin_wait_2 | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `last_ack` | last_ack | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `listen` | listen | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `syn_recv` | syn_recv | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `syn_received` | syn_received | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `syn_sent` | syn_sent | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `time_wait` | time_wait | ![Experimental](https://img.shields.io/badge/-experimental-blue) | diff --git a/model/network/registry.yaml b/model/network/registry.yaml index 0b217bfa5b..2dc0ce39a1 100644 --- a/model/network/registry.yaml +++ b/model/network/registry.yaml @@ -239,8 +239,8 @@ groups: - id: network.connection.state type: members: - - id: close - value: 'close' + - id: closed + value: 'closed' stability: experimental - id: close_wait value: 'close_wait' @@ -248,9 +248,6 @@ groups: - id: closing value: 'closing' stability: experimental - - id: delete - value: 'delete' - stability: experimental - id: established value: 'established' stability: experimental @@ -266,8 +263,8 @@ groups: - id: listen value: 'listen' stability: experimental - - id: syn_recv - value: 'syn_recv' + - id: syn_received + value: 'syn_received' stability: experimental - id: syn_sent value: 'syn_sent' @@ -277,5 +274,5 @@ groups: stability: experimental stability: experimental brief: "The state of network connection" - note: "A stateless protocol MUST NOT set this attribute" + note: "Connection states are defined as part of the [rfc9293](https://datatracker.ietf.org/doc/html/rfc9293#section-3.3.2)" examples: [ "close_wait" ] From 4213ae548440d18f8e15d16a56b426a8bd3d40bd Mon Sep 17 00:00:00 2001 From: Christos Markou Date: Mon, 16 Dec 2024 20:03:45 +0200 Subject: [PATCH 5/6] Update model/system/deprecated/registry-deprecated.yaml Co-authored-by: Alexandra Konrad --- model/system/deprecated/registry-deprecated.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model/system/deprecated/registry-deprecated.yaml b/model/system/deprecated/registry-deprecated.yaml index efaccf10a8..55b2e12d61 100644 --- a/model/system/deprecated/registry-deprecated.yaml +++ b/model/system/deprecated/registry-deprecated.yaml @@ -92,5 +92,5 @@ groups: value: 'time_wait' stability: experimental stability: experimental - brief: "A stateless protocol MUST NOT set this attribute" + brief: "Deprecated, use `network.connection.state` instead." examples: [ "close_wait" ] From 26c1d8d574e9182e35903d34b377fd7780184450 Mon Sep 17 00:00:00 2001 From: ChrsMark Date: Tue, 17 Dec 2024 13:30:18 +0200 Subject: [PATCH 6/6] make fix Signed-off-by: ChrsMark --- docs/attributes-registry/system.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/attributes-registry/system.md b/docs/attributes-registry/system.md index 1a7a534537..8a6f0166e6 100644 --- a/docs/attributes-registry/system.md +++ b/docs/attributes-registry/system.md @@ -147,7 +147,7 @@ Deprecated system attributes. | Attribute | Type | Description | Examples | Stability | |---|---|---|---|---| | `system.cpu.state` | string | Deprecated, use `cpu.mode` instead. | `idle`; `interrupt` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)
Replaced by `cpu.mode` | -| `system.network.state` | string | A stateless protocol MUST NOT set this attribute | `close_wait` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)
Removed, report network connection state with `network.connection.state` attribute | +| `system.network.state` | string | Deprecated, use `network.connection.state` instead. | `close_wait` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)
Removed, report network connection state with `network.connection.state` attribute | | `system.processes.status` | string | Deprecated, use `system.process.status` instead. | `running` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)
Replaced by `system.process.status`. | ---