Skip to content

Commit

Permalink
Fix units of process.open_file_descriptor.count and process.context_s…
Browse files Browse the repository at this point in the history
…witches (#1797)

Signed-off-by: ChrsMark <[email protected]>
  • Loading branch information
ChrsMark authored Feb 4, 2025
1 parent d7b2942 commit bd2ba6e
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 4 deletions.
22 changes: 22 additions & 0 deletions .chloggen/fix_process_units.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: bug_fix

# The name of the area of concern in the attributes-registry, (e.g. http, cloud, db)
component: process

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Fix units of process.open_file_descriptor.count and process.context_switches

# 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: [1662]

# (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/process-metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ This metric is [recommended][MetricRecommended].

| Name | Instrument Type | Unit (UCUM) | Description | Stability |
| -------- | --------------- | ----------- | -------------- | --------- |
| `process.open_file_descriptor.count` | UpDownCounter | `{count}` | Number of file descriptors in use by the process. | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `process.open_file_descriptor.count` | UpDownCounter | `{file_descriptor}` | Number of file descriptors in use by the process. | ![Experimental](https://img.shields.io/badge/-experimental-blue) |

<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->
Expand All @@ -285,7 +285,7 @@ This metric is [recommended][MetricRecommended].

| Name | Instrument Type | Unit (UCUM) | Description | Stability |
| -------- | --------------- | ----------- | -------------- | --------- |
| `process.context_switches` | Counter | `{count}` | Number of times the process has been context switched. | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `process.context_switches` | Counter | `{context_switch}` | Number of times the process has been context switched. | ![Experimental](https://img.shields.io/badge/-experimental-blue) |

| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
|---|---|---|---|---|---|
Expand Down
4 changes: 2 additions & 2 deletions model/process/metrics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,15 @@ groups:
stability: experimental
brief: "Number of file descriptors in use by the process."
instrument: updowncounter
unit: "{count}"
unit: "{file_descriptor}"

- id: metric.process.context_switches
type: metric
metric_name: process.context_switches
stability: experimental
brief: "Number of times the process has been context switched."
instrument: counter
unit: "{count}"
unit: "{context_switch}"
attributes:
- ref: process.context_switch_type

Expand Down

0 comments on commit bd2ba6e

Please sign in to comment.