Skip to content

Commit

Permalink
[metrics/system] Remove shared from system.memory.state values (#933)
Browse files Browse the repository at this point in the history
Signed-off-by: ChrsMark <chrismarkou92@gmail.com>
  • Loading branch information
ChrsMark authored Apr 30, 2024
1 parent 3dc61e1 commit 8590a71
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 3 deletions.
22 changes: 22 additions & 0 deletions .chloggen/decouple_shared_memory_metric.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: system

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Deprecate `shared` from `system.memory.state` values and make it a standalone metric

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

# (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:
2 changes: 1 addition & 1 deletion docs/attributes-registry/system.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
|---|---|---|
| `used` | used | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `free` | free | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `shared` | shared | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `shared` | shared | ![Deprecated](https://img.shields.io/badge/-deprecated-red)<br>Removed, report shared memory usage with `metric.system.memory.shared` metric |
| `buffers` | buffers | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `cached` | cached | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
<!-- endsemconv -->
Expand Down
21 changes: 19 additions & 2 deletions docs/system/system-metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Resource attributes related to a host, SHOULD be reported under the `host.*` nam
- [Memory Metrics](#memory-metrics)
- [Metric: `system.memory.usage`](#metric-systemmemoryusage)
- [Metric: `system.memory.limit`](#metric-systemmemorylimit)
- [Metric: `system.memory.shared`](#metric-systemmemoryshared)
- [Metric: `system.memory.utilization`](#metric-systemmemoryutilization)
- [Paging/Swap Metrics](#pagingswap-metrics)
- [Metric: `system.paging.usage`](#metric-systempagingusage)
Expand Down Expand Up @@ -202,7 +203,7 @@ available on the system, that is `system.memory.limit`.
|---|---|---|
| `used` | used | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `free` | free | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `shared` | shared | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `shared` | shared | ![Deprecated](https://img.shields.io/badge/-deprecated-red)<br>Removed, report shared memory usage with `metric.system.memory.shared` metric |
| `buffers` | buffers | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `cached` | cached | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
<!-- endsemconv -->
Expand All @@ -222,6 +223,22 @@ This metric is [opt-in][MetricOptIn].
<!-- semconv metric.system.memory.limit(full) -->
<!-- endsemconv -->

### Metric: `system.memory.shared`

This metric is [opt-in][MetricOptIn].

<!-- semconv metric.system.memory.shared(metric_table) -->
| Name | Instrument Type | Unit (UCUM) | Description | Stability |
| -------- | --------------- | ----------- | -------------- | --------- |
| `system.memory.shared` | UpDownCounter | `By` | Shared memory used (mostly by tmpfs). [1] | ![Experimental](https://img.shields.io/badge/-experimental-blue) |

**[1]:** Equivalent of `shared` from [`free` command](https://man7.org/linux/man-pages/man1/free.1.html) or
`Shmem` from [`/proc/meminfo`](https://man7.org/linux/man-pages/man5/proc.5.html)"
<!-- endsemconv -->

<!-- semconv metric.system.memory.shared(full) -->
<!-- endsemconv -->

### Metric: `system.memory.utilization`

This metric is [recommended][MetricRecommended].
Expand All @@ -243,7 +260,7 @@ This metric is [recommended][MetricRecommended].
|---|---|---|
| `used` | used | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `free` | free | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `shared` | shared | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `shared` | shared | ![Deprecated](https://img.shields.io/badge/-deprecated-red)<br>Removed, report shared memory usage with `metric.system.memory.shared` metric |
| `buffers` | buffers | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `cached` | cached | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
<!-- endsemconv -->
Expand Down
11 changes: 11 additions & 0 deletions model/metrics/system-metrics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,17 @@ groups:
unit: "By"
attributes: []

- id: metric.system.memory.shared
type: metric
metric_name: system.memory.shared
stability: experimental
brief: "Shared memory used (mostly by tmpfs)."
note: |
Equivalent of `shared` from [`free` command](https://man7.org/linux/man-pages/man1/free.1.html) or
`Shmem` from [`/proc/meminfo`](https://man7.org/linux/man-pages/man5/proc.5.html)"
instrument: updowncounter
unit: "By"

- id: metric.system.memory.utilization
type: metric
metric_name: system.memory.utilization
Expand Down
1 change: 1 addition & 0 deletions model/registry/system.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ groups:
- id: shared
value: 'shared'
stability: experimental
deprecated: 'Removed, report shared memory usage with `metric.system.memory.shared` metric'
- id: buffers
value: 'buffers'
stability: experimental
Expand Down

0 comments on commit 8590a71

Please sign in to comment.