Skip to content

Commit

Permalink
process: change process.uptime instrument to gauge (#1585)
Browse files Browse the repository at this point in the history
  • Loading branch information
braydonk authored Nov 16, 2024
1 parent fa564c9 commit 50ad22e
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 4 deletions.
22 changes: 22 additions & 0 deletions .chloggen/process_uptime.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: breaking

# 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: Change process.uptime instrument to a gauge.

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

# (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:
5 changes: 3 additions & 2 deletions docs/system/process-metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -341,9 +341,10 @@ This metric is [recommended][MetricRecommended].

| Name | Instrument Type | Unit (UCUM) | Description | Stability |
| -------- | --------------- | ----------- | -------------- | --------- |
| `process.uptime` | Counter | `s` | The time the process has been running. [1] | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `process.uptime` | Gauge | `s` | The time the process has been running. [1] | ![Experimental](https://img.shields.io/badge/-experimental-blue) |

**[1]:** Instrumentations SHOULD use counter with type `double` and measure uptime with at least millisecond precision
**[1]:** Instrumentations SHOULD use a gauge with type `double` and measure uptime in seconds as a floating point number with the highest precision available.
The actual accuracy would depend on the instrumentation and operating system.

<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->
Expand Down
6 changes: 4 additions & 2 deletions model/process/metrics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ groups:
metric_name: process.uptime
stability: experimental
brief: "The time the process has been running."
instrument: counter
note: |
Instrumentations SHOULD use a gauge with type `double` and measure uptime in seconds as a floating point number with the highest precision available.
The actual accuracy would depend on the instrumentation and operating system.
instrument: gauge
unit: "s"
note: "Instrumentations SHOULD use counter with type `double` and measure uptime with at least millisecond precision"

0 comments on commit 50ad22e

Please sign in to comment.