Skip to content

Commit 4728f63

Browse files
gregkalaposChrsMarkjoaopgrassitrisch-me
authored
[chore] Move system metric attributes to the registry (open-telemetry#867)
Co-authored-by: Chris Mark <[email protected]> Co-authored-by: Joao Grassi <[email protected]> Co-authored-by: Alexandra Konrad <[email protected]>
1 parent 1c93c94 commit 4728f63

File tree

8 files changed

+484
-301
lines changed

8 files changed

+484
-301
lines changed

.github/ISSUE_TEMPLATE/bug_report.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ body:
6161
- area:service
6262
- area:session
6363
- area:source
64+
- area:system
6465
- area:telemetry
6566
- area:thread
6667
- area:tls

.github/ISSUE_TEMPLATE/change_proposal.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ body:
5454
- area:service
5555
- area:session
5656
- area:source
57+
- area:system
5758
- area:telemetry
5859
- area:thread
5960
- area:tls

.github/ISSUE_TEMPLATE/new-conventions.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ body:
6363
- area:service
6464
- area:session
6565
- area:source
66+
- area:system
6667
- area:telemetry
6768
- area:thread
6869
- area:tls

docs/attributes-registry/system.md

+178
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,178 @@
1+
# System
2+
3+
<!-- toc -->
4+
5+
- [CPU attributes](#cpu-attributes)
6+
- [Memory attributes](#memory-attributes)
7+
- [Paging attributes](#paging-attributes)
8+
- [Filesystem attributes](#filesystem-attributes)
9+
- [Network attributes](#network-attributes)
10+
- [Process attributes](#process-attributes)
11+
- [Deprecated System Attributes](#deprecated-system-attributes)
12+
13+
<!-- tocstop -->
14+
15+
<!-- semconv registry.system(omit_requirement_level) -->
16+
| Attribute | Type | Description | Examples | Stability |
17+
|---|---|---|---|---|
18+
| `system.device` | string | The device identifier | `(identifier)` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
19+
<!-- endsemconv -->
20+
21+
## CPU attributes
22+
23+
<!-- semconv registry.system.cpu(omit_requirement_level) -->
24+
| Attribute | Type | Description | Examples | Stability |
25+
|---|---|---|---|---|
26+
| `system.cpu.logical_number` | int | The logical CPU number [0..n-1] | `1` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
27+
| `system.cpu.state` | string | The state of the CPU | `idle`; `interrupt` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
28+
29+
`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.
30+
31+
| Value | Description | Stability |
32+
|---|---|---|
33+
| `user` | user | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
34+
| `system` | system | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
35+
| `nice` | nice | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
36+
| `idle` | idle | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
37+
| `iowait` | iowait | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
38+
| `interrupt` | interrupt | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
39+
| `steal` | steal | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
40+
<!-- endsemconv -->
41+
42+
## Memory attributes
43+
44+
<!-- semconv registry.system.memory(omit_requirement_level) -->
45+
| Attribute | Type | Description | Examples | Stability |
46+
|---|---|---|---|---|
47+
| `system.memory.state` | string | The memory state | `free`; `cached` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
48+
49+
`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.
50+
51+
| Value | Description | Stability |
52+
|---|---|---|
53+
| `used` | used | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
54+
| `free` | free | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
55+
| `shared` | shared | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
56+
| `buffers` | buffers | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
57+
| `cached` | cached | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
58+
<!-- endsemconv -->
59+
60+
## Paging attributes
61+
62+
<!-- semconv registry.system.paging(omit_requirement_level) -->
63+
| Attribute | Type | Description | Examples | Stability |
64+
|---|---|---|---|---|
65+
| `system.paging.direction` | string | The paging access direction | `in` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
66+
| `system.paging.state` | string | The memory paging state | `free` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
67+
| `system.paging.type` | string | The memory paging type | `minor` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
68+
69+
`system.paging.direction` MUST be one of the following:
70+
71+
| Value | Description | Stability |
72+
|---|---|---|
73+
| `in` | in | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
74+
| `out` | out | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
75+
76+
`system.paging.state` MUST be one of the following:
77+
78+
| Value | Description | Stability |
79+
|---|---|---|
80+
| `used` | used | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
81+
| `free` | free | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
82+
83+
`system.paging.type` MUST be one of the following:
84+
85+
| Value | Description | Stability |
86+
|---|---|---|
87+
| `major` | major | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
88+
| `minor` | minor | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
89+
<!-- endsemconv -->
90+
91+
## Filesystem attributes
92+
93+
<!-- semconv registry.system.filesystem(omit_requirement_level) -->
94+
| Attribute | Type | Description | Examples | Stability |
95+
|---|---|---|---|---|
96+
| `system.filesystem.mode` | string | The filesystem mode | `rw, ro` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
97+
| `system.filesystem.mountpoint` | string | The filesystem mount path | `/mnt/data` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
98+
| `system.filesystem.state` | string | The filesystem state | `used` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
99+
| `system.filesystem.type` | string | The filesystem type | `ext4` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
100+
101+
`system.filesystem.state` MUST be one of the following:
102+
103+
| Value | Description | Stability |
104+
|---|---|---|
105+
| `used` | used | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
106+
| `free` | free | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
107+
| `reserved` | reserved | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
108+
109+
`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.
110+
111+
| Value | Description | Stability |
112+
|---|---|---|
113+
| `fat32` | fat32 | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
114+
| `exfat` | exfat | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
115+
| `ntfs` | ntfs | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
116+
| `refs` | refs | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
117+
| `hfsplus` | hfsplus | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
118+
| `ext4` | ext4 | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
119+
<!-- endsemconv -->
120+
121+
## Network attributes
122+
123+
<!-- semconv registry.system.network(omit_requirement_level) -->
124+
| Attribute | Type | Description | Examples | Stability |
125+
|---|---|---|---|---|
126+
| `system.network.state` | string | A stateless protocol MUST NOT set this attribute | `close_wait` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
127+
128+
`system.network.state` MUST be one of the following:
129+
130+
| Value | Description | Stability |
131+
|---|---|---|
132+
| `close` | close | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
133+
| `close_wait` | close_wait | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
134+
| `closing` | closing | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
135+
| `delete` | delete | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
136+
| `established` | established | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
137+
| `fin_wait_1` | fin_wait_1 | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
138+
| `fin_wait_2` | fin_wait_2 | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
139+
| `last_ack` | last_ack | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
140+
| `listen` | listen | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
141+
| `syn_recv` | syn_recv | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
142+
| `syn_sent` | syn_sent | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
143+
| `time_wait` | time_wait | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
144+
<!-- endsemconv -->
145+
146+
## Process attributes
147+
148+
<!-- semconv registry.system.process(omit_requirement_level) -->
149+
| Attribute | Type | Description | Examples | Stability |
150+
|---|---|---|---|---|
151+
| `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) |
152+
153+
`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.
154+
155+
| Value | Description | Stability |
156+
|---|---|---|
157+
| `running` | running | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
158+
| `sleeping` | sleeping | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
159+
| `stopped` | stopped | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
160+
| `defunct` | defunct | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
161+
<!-- endsemconv -->
162+
163+
## Deprecated System Attributes
164+
165+
<!-- semconv registry.system.deprecated(omit_requirement_level) -->
166+
| Attribute | Type | Description | Examples | Stability |
167+
|---|---|---|---|---|
168+
| `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`. |
169+
170+
`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.
171+
172+
| Value | Description | Stability |
173+
|---|---|---|
174+
| `running` | running | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
175+
| `sleeping` | sleeping | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
176+
| `stopped` | stopped | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
177+
| `defunct` | defunct | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
178+
<!-- endsemconv -->

docs/system/container-metrics.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ This metric is [opt-in][MetricOptIn].
6565
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
6666
|---|---|---|---|---|---|
6767
| [`disk.io.direction`](../attributes-registry/disk.md) | string | The disk IO operation direction. | `read` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
68-
| `system.device` | string | The device identifier | `(identifier)` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
68+
| [`system.device`](../attributes-registry/system.md) | string | The device identifier | `(identifier)` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
6969

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

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

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

0 commit comments

Comments
 (0)