Skip to content

Commit

Permalink
Align system.cpu.state's definition with this of process.cpu.state
Browse files Browse the repository at this point in the history
Signed-off-by: ChrsMark <chrismarkou92@gmail.com>
  • Loading branch information
ChrsMark committed Feb 23, 2024
1 parent 096596b commit b0e5ccb
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 3 deletions.
22 changes: 22 additions & 0 deletions .chloggen/add_cpu_state_constraint.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: 'enhancement'

# 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: Align `system.cpu.state`'s definition with this of `process.cpu.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: [563]

# (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:
4 changes: 2 additions & 2 deletions docs/system/system-metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ This metric is [recommended][MetricRecommended].
| Attribute | Type | Description | Examples | Requirement Level |
|---|---|---|---|---|
| `system.cpu.logical_number` | int | The logical CPU number [0..n-1] | `1` | Recommended |
| `system.cpu.state` | string | The state of the CPU | `idle`; `interrupt` | Recommended |
| `system.cpu.state` | string | The CPU state for this data point. A system's CPU SHOULD be characterized _either_ by data points with no `state` labels, _or only_ data points with `state` labels. | `idle`; `interrupt` | Recommended |

`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.

Expand Down Expand Up @@ -116,7 +116,7 @@ This metric is [recommended][MetricRecommended].
| Attribute | Type | Description | Examples | Requirement Level |
|---|---|---|---|---|
| `system.cpu.logical_number` | int | The logical CPU number [0..n-1] | `1` | Recommended |
| `system.cpu.state` | string | The state of the CPU | `idle`; `interrupt` | Recommended |
| `system.cpu.state` | string | The CPU state for this data point. A system's CPU SHOULD be characterized _either_ by data points with no `state` labels, _or only_ data points with `state` labels. | `idle`; `interrupt` | Recommended |

`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.

Expand Down
2 changes: 1 addition & 1 deletion model/metrics/system-metrics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ groups:
value: 'interrupt'
- id: steal
value: 'steal'
brief: "The state of the CPU"
brief: "The CPU state for this data point. A system's CPU SHOULD be characterized *either* by data points with no `state` labels, *or only* data points with `state` labels."
examples: ["idle", "interrupt"]
- id: logical_number
type: int
Expand Down

0 comments on commit b0e5ccb

Please sign in to comment.