Skip to content

Commit ef973b3

Browse files
authored
Rename system.process.status to process.state (#2974)
Signed-off-by: ChrsMark <[email protected]>
1 parent 20b2e61 commit ef973b3

File tree

8 files changed

+92
-51
lines changed

8 files changed

+92
-51
lines changed

.chloggen/fix_process_state.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Use this changelog template to create an entry for release notes.
2+
#
3+
# If your change doesn't affect end users you should instead start
4+
# your pull request title with [chore] or use the "Skip Changelog" label.
5+
6+
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
7+
change_type: breaking
8+
9+
# The name of the area of concern in the attributes-registry, (e.g. http, cloud, db)
10+
component: system, process
11+
12+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
13+
note: Rename `system.process.status` to `process.state`
14+
15+
# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
16+
# The values here must be integers.
17+
issues: [1803]
18+
19+
# (Optional) One or more lines of additional information to render under the primary note.
20+
# These lines will be padded with 2 spaces and then inserted directly into the document.
21+
# Use pipe (|) for multiline entries.
22+
subtext:

docs/registry/attributes/process.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ An operating system process.
4040
| <a id="process-saved-user-id" href="#process-saved-user-id">`process.saved_user.id`</a> | int | The saved user ID (SUID) of the process. | `1002` | ![Development](https://img.shields.io/badge/-development-blue) |
4141
| <a id="process-saved-user-name" href="#process-saved-user-name">`process.saved_user.name`</a> | string | The username of the saved user. | `operator` | ![Development](https://img.shields.io/badge/-development-blue) |
4242
| <a id="process-session-leader-pid" href="#process-session-leader-pid">`process.session_leader.pid`</a> | int | The PID of the process's session leader. This is also the session ID (SID) of the process. | `14` | ![Development](https://img.shields.io/badge/-development-blue) |
43+
| <a id="process-state" href="#process-state">`process.state`</a> | string | The process state, e.g., [Linux Process State Codes](https://man7.org/linux/man-pages/man1/ps.1.html#PROCESS_STATE_CODES) | `running` | ![Development](https://img.shields.io/badge/-development-blue) |
4344
| <a id="process-title" href="#process-title">`process.title`</a> | string | Process title (proctitle) [3] | `cat /etc/hostname`; `xfce4-session`; `bash` | ![Development](https://img.shields.io/badge/-development-blue) |
4445
| <a id="process-user-id" href="#process-user-id">`process.user.id`</a> | int | The effective user ID (EUID) of the process. | `1001` | ![Development](https://img.shields.io/badge/-development-blue) |
4546
| <a id="process-user-name" href="#process-user-name">`process.user.name`</a> | string | The username of the effective user of the process. | `root` | ![Development](https://img.shields.io/badge/-development-blue) |
@@ -70,6 +71,17 @@ with value `"/usr/local/bin:/usr/bin"`.
7071
| `involuntary` | involuntary | ![Development](https://img.shields.io/badge/-development-blue) |
7172
| `voluntary` | voluntary | ![Development](https://img.shields.io/badge/-development-blue) |
7273

74+
---
75+
76+
`process.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.
77+
78+
| Value | Description | Stability |
79+
|---|---|---|
80+
| `defunct` | defunct | ![Development](https://img.shields.io/badge/-development-blue) |
81+
| `running` | running | ![Development](https://img.shields.io/badge/-development-blue) |
82+
| `sleeping` | sleeping | ![Development](https://img.shields.io/badge/-development-blue) |
83+
| `stopped` | stopped | ![Development](https://img.shields.io/badge/-development-blue) |
84+
7385
## Process Linux Attributes
7486

7587
Describes Linux Process attributes

docs/registry/attributes/system.md

Lines changed: 13 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
- [Filesystem Attributes](#filesystem-attributes)
88
- [System Memory Attributes](#system-memory-attributes)
99
- [System Paging Attributes](#system-paging-attributes)
10-
- [System Process Attributes](#system-process-attributes)
1110
- [Deprecated System Attributes](#deprecated-system-attributes)
1211

1312
## General System Attributes
@@ -110,25 +109,6 @@ Describes System Memory Paging attributes
110109
| `free` | free | ![Development](https://img.shields.io/badge/-development-blue) |
111110
| `used` | used | ![Development](https://img.shields.io/badge/-development-blue) |
112111

113-
## System Process Attributes
114-
115-
Describes System Process attributes
116-
117-
| Attribute | Type | Description | Examples | Stability |
118-
|---|---|---|---|---|
119-
| <a id="system-process-status" href="#system-process-status">`system.process.status`</a> | string | The process state, e.g., [Linux Process State Codes](https://man7.org/linux/man-pages/man1/ps.1.html#PROCESS_STATE_CODES) | `running` | ![Development](https://img.shields.io/badge/-development-blue) |
120-
121-
---
122-
123-
`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.
124-
125-
| Value | Description | Stability |
126-
|---|---|---|
127-
| `defunct` | defunct | ![Development](https://img.shields.io/badge/-development-blue) |
128-
| `running` | running | ![Development](https://img.shields.io/badge/-development-blue) |
129-
| `sleeping` | sleeping | ![Development](https://img.shields.io/badge/-development-blue) |
130-
| `stopped` | stopped | ![Development](https://img.shields.io/badge/-development-blue) |
131-
132112
## Deprecated System Attributes
133113

134114
Deprecated system attributes.
@@ -139,7 +119,8 @@ Deprecated system attributes.
139119
| <a id="system-cpu-state" href="#system-cpu-state">`system.cpu.state`</a> | string | Deprecated, use `cpu.mode` instead. | `idle`; `interrupt` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)<br>Replaced by `cpu.mode`. |
140120
| <a id="system-network-state" href="#system-network-state">`system.network.state`</a> | string | Deprecated, use `network.connection.state` instead. | `close_wait` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)<br>Replaced by `network.connection.state`. |
141121
| <a id="system-paging-type" href="#system-paging-type">`system.paging.type`</a> | string | Deprecated, use `system.paging.fault.type` instead. | `minor` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)<br>Replaced by `system.paging.fault.type`. |
142-
| <a id="system-processes-status" href="#system-processes-status">`system.processes.status`</a> | string | Deprecated, use `system.process.status` instead. | `running` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)<br>Replaced by `system.process.status`. |
122+
| <a id="system-process-status" href="#system-process-status">`system.process.status`</a> | string | Deprecated, use `process.state` instead. | `running` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)<br>Replaced by `process.state`. |
123+
| <a id="system-processes-status" href="#system-processes-status">`system.processes.status`</a> | string | Deprecated, use `process.state` instead. | `running` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)<br>Replaced by `process.state`. |
143124

144125
---
145126

@@ -185,6 +166,17 @@ Deprecated system attributes.
185166

186167
---
187168

169+
`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.
170+
171+
| Value | Description | Stability |
172+
|---|---|---|
173+
| `defunct` | defunct | ![Development](https://img.shields.io/badge/-development-blue) |
174+
| `running` | running | ![Development](https://img.shields.io/badge/-development-blue) |
175+
| `sleeping` | sleeping | ![Development](https://img.shields.io/badge/-development-blue) |
176+
| `stopped` | stopped | ![Development](https://img.shields.io/badge/-development-blue) |
177+
178+
---
179+
188180
`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.
189181

190182
| Value | Description | Stability |

docs/system/system-metrics.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1111,11 +1111,11 @@ This metric is [recommended][MetricRecommended].
11111111

11121112
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
11131113
|---|---|---|---|---|---|
1114-
| [`system.process.status`](/docs/registry/attributes/system.md) | string | The process state, e.g., [Linux Process State Codes](https://man7.org/linux/man-pages/man1/ps.1.html#PROCESS_STATE_CODES) | `running` | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) |
1114+
| [`process.state`](/docs/registry/attributes/process.md) | string | The process state, e.g., [Linux Process State Codes](https://man7.org/linux/man-pages/man1/ps.1.html#PROCESS_STATE_CODES) | `running` | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) |
11151115

11161116
---
11171117

1118-
`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.
1118+
`process.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.
11191119

11201120
| Value | Description | Stability |
11211121
|---|---|---|

model/process/registry.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,25 @@ groups:
245245
type: template[string]
246246
stability: development
247247
examples: ['ubuntu', '/usr/local/bin:/usr/bin']
248+
- id: process.state
249+
type:
250+
members:
251+
- id: running
252+
value: 'running'
253+
stability: development
254+
- id: sleeping
255+
value: 'sleeping'
256+
stability: development
257+
- id: stopped
258+
value: 'stopped'
259+
stability: development
260+
- id: defunct
261+
value: 'defunct'
262+
stability: development
263+
stability: development
264+
brief: >
265+
The process state, e.g., [Linux Process State Codes](https://man7.org/linux/man-pages/man1/ps.1.html#PROCESS_STATE_CODES)
266+
examples: [ "running" ]
248267
# process.linux* attribute group
249268
- id: registry.process.linux
250269
type: attribute_group

model/system/deprecated/registry-deprecated.yaml

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ groups:
1919
- id: defunct
2020
value: 'defunct'
2121
stability: development
22-
brief: "Deprecated, use `system.process.status` instead."
22+
brief: "Deprecated, use `process.state` instead."
2323
deprecated:
2424
reason: renamed
25-
renamed_to: system.process.status
25+
renamed_to: process.state
2626
stability: development
2727
examples: ["running"]
2828
- id: system.cpu.state
@@ -123,3 +123,24 @@ groups:
123123
renamed_to: system.paging.fault.type
124124
brief: "Deprecated, use `system.paging.fault.type` instead."
125125
examples: [ "minor" ]
126+
- id: system.process.status
127+
type:
128+
members:
129+
- id: running
130+
value: 'running'
131+
stability: development
132+
- id: sleeping
133+
value: 'sleeping'
134+
stability: development
135+
- id: stopped
136+
value: 'stopped'
137+
stability: development
138+
- id: defunct
139+
value: 'defunct'
140+
stability: development
141+
stability: development
142+
deprecated:
143+
reason: renamed
144+
renamed_to: process.state
145+
brief: "Deprecated, use `process.state` instead."
146+
examples: [ "running" ]

model/system/metrics.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,7 @@ groups:
506506
instrument: updowncounter
507507
unit: "{process}"
508508
attributes:
509-
- ref: system.process.status
509+
- ref: process.state
510510
entity_associations:
511511
- host
512512

model/system/registry.yaml

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -143,28 +143,3 @@ groups:
143143
stability: development
144144
brief: "The filesystem mount path"
145145
examples: ["/mnt/data"]
146-
# system.process.* attribute group
147-
- id: registry.system.process
148-
type: attribute_group
149-
display_name: System Process Attributes
150-
brief: "Describes System Process attributes"
151-
attributes:
152-
- id: system.process.status
153-
type:
154-
members:
155-
- id: running
156-
value: 'running'
157-
stability: development
158-
- id: sleeping
159-
value: 'sleeping'
160-
stability: development
161-
- id: stopped
162-
value: 'stopped'
163-
stability: development
164-
- id: defunct
165-
value: 'defunct'
166-
stability: development
167-
stability: development
168-
brief: >
169-
The process state, e.g., [Linux Process State Codes](https://man7.org/linux/man-pages/man1/ps.1.html#PROCESS_STATE_CODES)
170-
examples: ["running"]

0 commit comments

Comments
 (0)