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

[chore] Move system metric attributes to the registry #867

Merged
merged 8 commits into from
Apr 17, 2024
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
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ body:
- area:service
- area:session
- area:source
- area:system
- area:telemetry
- area:thread
- area:tls
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/change_proposal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ body:
- area:service
- area:session
- area:source
- area:system
- area:telemetry
- area:thread
- area:tls
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/new-conventions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ body:
- area:service
- area:session
- area:source
- area:system
- area:telemetry
- area:thread
- area:tls
Expand Down
178 changes: 178 additions & 0 deletions docs/attributes-registry/system.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,178 @@
# System

<!-- toc -->

- [CPU attributes](#cpu-attributes)
- [Memory attributes](#memory-attributes)
- [Paging attributes](#paging-attributes)
- [Filesystem attributes](#filesystem-attributes)
- [Network attributes](#network-attributes)
- [Process attributes](#process-attributes)
- [Deprecated System Attributes](#deprecated-system-attributes)

gregkalapos marked this conversation as resolved.
Show resolved Hide resolved
<!-- tocstop -->

<!-- semconv registry.system(omit_requirement_level) -->
| Attribute | Type | Description | Examples | Stability |
|---|---|---|---|---|
| `system.device` | string | The device identifier | `(identifier)` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
<!-- endsemconv -->

## CPU attributes

<!-- semconv registry.system.cpu(omit_requirement_level) -->
AlexanderWert marked this conversation as resolved.
Show resolved Hide resolved
| Attribute | Type | Description | Examples | Stability |
|---|---|---|---|---|
| `system.cpu.logical_number` | int | The logical CPU number [0..n-1] | `1` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `system.cpu.state` | string | The state of the CPU | `idle`; `interrupt` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |

`system.cpu.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 |
|---|---|---|
| `user` | user | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `system` | system | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `nice` | nice | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `idle` | idle | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `iowait` | iowait | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `interrupt` | interrupt | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `steal` | steal | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
<!-- endsemconv -->

## Memory attributes

<!-- semconv registry.system.memory(omit_requirement_level) -->
| Attribute | Type | Description | Examples | Stability |
|---|---|---|---|---|
| `system.memory.state` | string | The memory state | `free`; `cached` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |

`system.memory.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 |
|---|---|---|
| `used` | used | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `free` | free | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `shared` | shared | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `buffers` | buffers | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `cached` | cached | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
<!-- endsemconv -->

## Paging attributes

<!-- semconv registry.system.paging(omit_requirement_level) -->
| Attribute | Type | Description | Examples | Stability |
|---|---|---|---|---|
| `system.paging.direction` | string | The paging access direction | `in` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `system.paging.state` | string | The memory paging state | `free` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `system.paging.type` | string | The memory paging type | `minor` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |

`system.paging.direction` MUST be one of the following:

| Value | Description | Stability |
|---|---|---|
| `in` | in | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `out` | out | ![Experimental](https://img.shields.io/badge/-experimental-blue) |

`system.paging.state` MUST be one of the following:

| Value | Description | Stability |
|---|---|---|
| `used` | used | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `free` | free | ![Experimental](https://img.shields.io/badge/-experimental-blue) |

`system.paging.type` MUST be one of the following:

| Value | Description | Stability |
|---|---|---|
| `major` | major | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `minor` | minor | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
<!-- endsemconv -->

## Filesystem attributes

<!-- semconv registry.system.filesystem(omit_requirement_level) -->
| Attribute | Type | Description | Examples | Stability |
|---|---|---|---|---|
| `system.filesystem.mode` | string | The filesystem mode | `rw, ro` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `system.filesystem.mountpoint` | string | The filesystem mount path | `/mnt/data` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `system.filesystem.state` | string | The filesystem state | `used` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `system.filesystem.type` | string | The filesystem type | `ext4` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |

`system.filesystem.state` MUST be one of the following:

| Value | Description | Stability |
|---|---|---|
| `used` | used | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `free` | free | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `reserved` | reserved | ![Experimental](https://img.shields.io/badge/-experimental-blue) |

`system.filesystem.type` 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 |
|---|---|---|
| `fat32` | fat32 | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `exfat` | exfat | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `ntfs` | ntfs | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `refs` | refs | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `hfsplus` | hfsplus | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `ext4` | ext4 | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
<!-- endsemconv -->

## Network attributes

<!-- semconv registry.system.network(omit_requirement_level) -->
| 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` MUST be one of the following:

| 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) |
<!-- endsemconv -->

## Process attributes

<!-- semconv registry.system.process(omit_requirement_level) -->
| Attribute | Type | Description | Examples | Stability |
|---|---|---|---|---|
| `system.process.status` | string | The process state, e.g., [Linux Process State Codes](https://man7.org/linux/man-pages/man1/ps.1.html#PROCESS_STATE_CODES) | `running` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |

`system.process.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 |
|---|---|---|
| `running` | running | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `sleeping` | sleeping | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `stopped` | stopped | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `defunct` | defunct | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
<!-- endsemconv -->

## Deprecated System Attributes

<!-- semconv registry.system.deprecated(omit_requirement_level) -->
| Attribute | Type | Description | Examples | Stability |
|---|---|---|---|---|
| `system.processes.status` | string | Deprecated, use `system.process.status` instead. | `running` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)<br>Replaced by `system.process.status`. |

`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 |
|---|---|---|
| `running` | running | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `sleeping` | sleeping | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `stopped` | stopped | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `defunct` | defunct | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
<!-- endsemconv -->
4 changes: 2 additions & 2 deletions docs/system/container-metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ This metric is [opt-in][MetricOptIn].
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
|---|---|---|---|---|---|
| [`disk.io.direction`](../attributes-registry/disk.md) | string | The disk IO operation direction. | `read` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `system.device` | string | The device identifier | `(identifier)` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| [`system.device`](../attributes-registry/system.md) | string | The device identifier | `(identifier)` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |

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

Expand All @@ -91,7 +91,7 @@ This metric is [opt-in][MetricOptIn].
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
|---|---|---|---|---|---|
| [`network.io.direction`](../attributes-registry/network.md) | string | The network IO operation direction. | `transmit` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `system.device` | string | The device identifier | `(identifier)` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| [`system.device`](../attributes-registry/system.md) | string | The device identifier | `(identifier)` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |

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

Expand Down
Loading
Loading