Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

system: shared IO direction attributes #530

Merged
merged 17 commits into from
Nov 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions docs/attributes-registry/network.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ These attributes may be used for any network related operation.
| `network.carrier.name` | string | The name of the mobile carrier. | `sprint` |
| `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` |
| `network.connection.type` | string | The internet connection type. | `wifi` |
| `network.io.direction` | string | The network IO operation direction. | `transmit` |
| `network.local.address` | string | ![Stable](https://img.shields.io/badge/-stable-lightgreen)<br>Local address of the network connection - IP address or Unix domain socket name. | `10.1.2.80`; `/tmp/my.sock` |
| `network.local.port` | int | ![Stable](https://img.shields.io/badge/-stable-lightgreen)<br>Local port number of the network connection. | `65123` |
| `network.peer.address` | string | ![Stable](https://img.shields.io/badge/-stable-lightgreen)<br>Peer address of the network connection - IP address or Unix domain socket name. | `10.1.2.80`; `/tmp/my.sock` |
Expand Down Expand Up @@ -73,6 +74,13 @@ different processes could be listening on TCP port 12345 and UDP port 12345.
| `unavailable` | unavailable |
| `unknown` | unknown |

`network.io.direction` MUST be one of the following:

| Value | Description |
|---|---|
| `transmit` | transmit |
| `receive` | receive |

`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 |
Expand Down
32 changes: 16 additions & 16 deletions docs/system/system-metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -359,10 +359,10 @@ This metric is [recommended][MetricRecommended].
<!-- semconv metric.system.disk.io(full) -->
| Attribute | Type | Description | Examples | Requirement Level |
|---|---|---|---|---|
| `disk.io.direction` | string | The disk IO operation direction. | `read` | Recommended |
| `system.device` | string | The device identifier | `(identifier)` | Recommended |
| `system.disk.direction` | string | The disk operation direction | `read` | Recommended |

`system.disk.direction` MUST be one of the following:
`disk.io.direction` MUST be one of the following:

| Value | Description |
|---|---|
Expand All @@ -383,10 +383,10 @@ This metric is [recommended][MetricRecommended].
<!-- semconv metric.system.disk.operations(full) -->
| Attribute | Type | Description | Examples | Requirement Level |
|---|---|---|---|---|
| `disk.io.direction` | string | The disk IO operation direction. | `read` | Recommended |
| `system.device` | string | The device identifier | `(identifier)` | Recommended |
| `system.disk.direction` | string | The disk operation direction | `read` | Recommended |

`system.disk.direction` MUST be one of the following:
`disk.io.direction` MUST be one of the following:

| Value | Description |
|---|---|
Expand Down Expand Up @@ -435,10 +435,10 @@ This metric is [recommended][MetricRecommended].
<!-- semconv metric.system.disk.operation_time(full) -->
| Attribute | Type | Description | Examples | Requirement Level |
|---|---|---|---|---|
| `disk.io.direction` | string | The disk IO operation direction. | `read` | Recommended |
| `system.device` | string | The device identifier | `(identifier)` | Recommended |
| `system.disk.direction` | string | The disk operation direction | `read` | Recommended |

`system.disk.direction` MUST be one of the following:
`disk.io.direction` MUST be one of the following:

| Value | Description |
|---|---|
Expand All @@ -459,10 +459,10 @@ This metric is [recommended][MetricRecommended].
<!-- semconv metric.system.disk.merged(full) -->
| Attribute | Type | Description | Examples | Requirement Level |
|---|---|---|---|---|
| `disk.io.direction` | string | The disk IO operation direction. | `read` | Recommended |
| `system.device` | string | The device identifier | `(identifier)` | Recommended |
| `system.disk.direction` | string | The disk operation direction | `read` | Recommended |

`system.disk.direction` MUST be one of the following:
`disk.io.direction` MUST be one of the following:

| Value | Description |
|---|---|
Expand Down Expand Up @@ -575,10 +575,10 @@ This metric is [recommended][MetricRecommended].
<!-- semconv metric.system.network.dropped(full) -->
| Attribute | Type | Description | Examples | Requirement Level |
|---|---|---|---|---|
| [`network.io.direction`](../attributes-registry/network.md) | string | The network IO operation direction. | `transmit` | Recommended |
| `system.device` | string | The device identifier | `(identifier)` | Recommended |
| `system.network.direction` | string | | `transmit` | Recommended |

`system.network.direction` MUST be one of the following:
`network.io.direction` MUST be one of the following:

| Value | Description |
|---|---|
Expand All @@ -599,10 +599,10 @@ This metric is [recommended][MetricRecommended].
<!-- semconv metric.system.network.packets(full) -->
| Attribute | Type | Description | Examples | Requirement Level |
|---|---|---|---|---|
| [`network.io.direction`](../attributes-registry/network.md) | string | The network IO operation direction. | `transmit` | Recommended |
| `system.device` | string | The device identifier | `(identifier)` | Recommended |
| `system.network.direction` | string | | `transmit` | Recommended |

`system.network.direction` MUST be one of the following:
`network.io.direction` MUST be one of the following:

| Value | Description |
|---|---|
Expand All @@ -629,10 +629,10 @@ This metric is [recommended][MetricRecommended].
<!-- semconv metric.system.network.errors(full) -->
| Attribute | Type | Description | Examples | Requirement Level |
|---|---|---|---|---|
| [`network.io.direction`](../attributes-registry/network.md) | string | The network IO operation direction. | `transmit` | Recommended |
| `system.device` | string | The device identifier | `(identifier)` | Recommended |
| `system.network.direction` | string | | `transmit` | Recommended |

`system.network.direction` MUST be one of the following:
`network.io.direction` MUST be one of the following:

| Value | Description |
|---|---|
Expand All @@ -653,10 +653,10 @@ This metric is [recommended][MetricRecommended].
<!-- semconv metric.system.network.io(full) -->
| Attribute | Type | Description | Examples | Requirement Level |
|---|---|---|---|---|
| [`network.io.direction`](../attributes-registry/network.md) | string | The network IO operation direction. | `transmit` | Recommended |
| `system.device` | string | The device identifier | `(identifier)` | Recommended |
| `system.network.direction` | string | | `transmit` | Recommended |

`system.network.direction` MUST be one of the following:
`network.io.direction` MUST be one of the following:

| Value | Description |
|---|---|
Expand Down
44 changes: 10 additions & 34 deletions model/metrics/system-metrics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -213,22 +213,6 @@ groups:
- ref: system.paging.direction

# system.disk.* metrics and attribute group
- id: attributes.system.disk
prefix: system.disk
type: attribute_group
brief: "Describes System Disk metric attributes"
attributes:
- id: direction
type:
allow_custom_values: false
members:
- id: read
value: 'read'
- id: write
value: 'write'
brief: "The disk operation direction"
examples: ["read"]

- id: metric.system.disk.io
type: metric
metric_name: system.disk.io
Expand All @@ -237,7 +221,7 @@ groups:
unit: "By"
attributes:
- ref: system.device
- ref: system.disk.direction
- ref: disk.io.direction

- id: metric.system.disk.operations
type: metric
Expand All @@ -247,7 +231,7 @@ groups:
unit: "{operation}"
attributes:
- ref: system.device
- ref: system.disk.direction
- ref: disk.io.direction

- id: metric.system.disk.io_time
type: metric
Expand Down Expand Up @@ -278,7 +262,7 @@ groups:
- Windows: "Avg. Disk sec/Read" perf counter multiplied by "Disk Reads/sec" perf counter (similar for Writes)
attributes:
- ref: system.device
- ref: system.disk.direction
- ref: disk.io.direction

- id: metric.system.disk.merged
type: metric
Expand All @@ -288,7 +272,7 @@ groups:
unit: "{operation}"
attributes:
- ref: system.device
- ref: system.disk.direction
- ref: disk.io.direction

# system.filesystem.* metrics and attribute group
- id: attributes.system.filesystem
Expand Down Expand Up @@ -362,21 +346,13 @@ groups:
- ref: system.filesystem.mountpoint

# system.network.* metrics and attribute group

# System-specific network attributes
- id: attributes.system.network
prefix: system.network
type: attribute_group
brief: "Describes Network metric attributes"
attributes:
- id: direction
type:
allow_custom_values: false
members:
- id: transmit
value: 'transmit'
- id: receive
value: 'receive'
brief: ""
examples: ["transmit"]
- id: state
type:
allow_custom_values: false
Expand Down Expand Up @@ -422,7 +398,7 @@ groups:
from [`GetIfEntry2`](https://docs.microsoft.com/windows/win32/api/netioapi/nf-netioapi-getifentry2)
attributes:
- ref: system.device
- ref: system.network.direction
- ref: network.io.direction

- id: metric.system.network.packets
type: metric
Expand All @@ -432,7 +408,7 @@ groups:
unit: "{packet}"
attributes:
- ref: system.device
- ref: system.network.direction
- ref: network.io.direction

- id: metric.system.network.errors
type: metric
Expand All @@ -448,7 +424,7 @@ groups:
from [`GetIfEntry2`](https://docs.microsoft.com/windows/win32/api/netioapi/nf-netioapi-getifentry2).
attributes:
- ref: system.device
- ref: system.network.direction
- ref: network.io.direction

- id: metric.system.network.io
type: metric
Expand All @@ -458,7 +434,7 @@ groups:
unit: "By"
attributes:
- ref: system.device
- ref: system.network.direction
- ref: network.io.direction

- id: metric.system.network.connections
type: metric
Expand Down
17 changes: 17 additions & 0 deletions model/registry/disk.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
groups:
- id: registry.disk
prefix: disk
type: attribute_group
brief: >
These attributes may be used for any disk related operation.
attributes:
- id: io.direction
type:
allow_custom_values: false
members:
- id: read
value: 'read'
- id: write
value: 'write'
brief: "The disk IO operation direction."
examples: ["read"]
10 changes: 10 additions & 0 deletions model/registry/network.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -182,3 +182,13 @@ groups:
brief: '[OSI network layer](https://osi-model.com/network-layer/) or non-OSI equivalent.'
note: The value SHOULD be normalized to lowercase.
examples: ['ipv4', 'ipv6']
- id: io.direction
type:
allow_custom_values: false
members:
- id: transmit
value: 'transmit'
- id: receive
value: 'receive'
brief: "The network IO operation direction."
examples: ["transmit"]
Loading