Skip to content

Commit

Permalink
Replace with
Browse files Browse the repository at this point in the history
Signed-off-by: ChrsMark <[email protected]>
  • Loading branch information
ChrsMark committed Nov 29, 2024
1 parent 0edb9e2 commit ba65c2c
Show file tree
Hide file tree
Showing 8 changed files with 109 additions and 16 deletions.
22 changes: 22 additions & 0 deletions .chloggen/fix_system_net_state.yaml
Original file line number Diff line number Diff line change
@@ -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:
20 changes: 20 additions & 0 deletions docs/attributes-registry/network.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ These attributes may be used for any network related operation.
| <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) |
| <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) |
| <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) |
| <a id="network-connection-state" href="#network-connection-state">`network.connection.state`</a> | string | A stateless protocol MUST NOT set this attribute | `close_wait` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| <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) |
| <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) |
| <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) |
Expand Down Expand Up @@ -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 |
Expand Down
2 changes: 1 addition & 1 deletion docs/attributes-registry/system.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ Describes Network attributes

| Attribute | Type | Description | Examples | Stability |
|---|---|---|---|---|
| <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) |
| <a id="system-network-state" href="#system-network-state">`system.network.state`</a> | string | A stateless protocol MUST NOT set this attribute | `close_wait` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)<br>Removed, report network connection state with `network.connection.state` attribute |

---

Expand Down
28 changes: 14 additions & 14 deletions docs/system/system-metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -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 |
|---|---|---|
Expand All @@ -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) |

<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->
<!-- END AUTOGENERATED TEXT -->
Expand Down
42 changes: 42 additions & 0 deletions model/network/registry.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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" ]
2 changes: 1 addition & 1 deletion model/system/metrics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions model/system/registry.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 8 additions & 0 deletions schema-next.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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/1492
- rename_attributes:
attribute_map:
system.network.state: network.connection.state
apply_to_metrics:
- system.network.connections
1.29.0:
all:
changes:
Expand Down

0 comments on commit ba65c2c

Please sign in to comment.