From 9c8066c3eb84b2be129d701593eb8dd9814b17ea Mon Sep 17 00:00:00 2001 From: ChrsMark Date: Thu, 18 Apr 2024 11:45:46 +0300 Subject: [PATCH 1/4] [metrics/system] Remove shared from system.memory.state values Signed-off-by: ChrsMark --- .chloggen/decouple_shared_memory_metric.yaml | 22 ++++++++++++++++++++ docs/attributes-registry/system.md | 1 - docs/system/system-metrics.md | 15 +++++++++++-- model/metrics/system-metrics.yaml | 8 +++++++ model/registry/system.yaml | 3 --- 5 files changed, 43 insertions(+), 6 deletions(-) create mode 100755 .chloggen/decouple_shared_memory_metric.yaml diff --git a/.chloggen/decouple_shared_memory_metric.yaml b/.chloggen/decouple_shared_memory_metric.yaml new file mode 100755 index 0000000000..99f1e15a55 --- /dev/null +++ b/.chloggen/decouple_shared_memory_metric.yaml @@ -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: Remove `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: diff --git a/docs/attributes-registry/system.md b/docs/attributes-registry/system.md index 9760a9ee6b..73ac3757bc 100644 --- a/docs/attributes-registry/system.md +++ b/docs/attributes-registry/system.md @@ -52,7 +52,6 @@ |---|---|---| | `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) | | `buffers` | buffers | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `cached` | cached | ![Experimental](https://img.shields.io/badge/-experimental-blue) | diff --git a/docs/system/system-metrics.md b/docs/system/system-metrics.md index 8a62a0ec7d..423c52c077 100644 --- a/docs/system/system-metrics.md +++ b/docs/system/system-metrics.md @@ -202,7 +202,6 @@ 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) | | `buffers` | buffers | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `cached` | cached | ![Experimental](https://img.shields.io/badge/-experimental-blue) | @@ -222,6 +221,19 @@ This metric is [opt-in][MetricOptIn]. +### Metric: `system.memory.shared` + +This metric is [opt-in][MetricOptIn]. + + +| Name | Instrument Type | Unit (UCUM) | Description | Stability | +| -------- | --------------- | ----------- | -------------- | --------- | +| `system.memory.shared` | UpDownCounter | `By` | Reports shared memory. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | + + + + + ### Metric: `system.memory.utilization` This metric is [recommended][MetricRecommended]. @@ -243,7 +255,6 @@ 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) | | `buffers` | buffers | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `cached` | cached | ![Experimental](https://img.shields.io/badge/-experimental-blue) | diff --git a/model/metrics/system-metrics.yaml b/model/metrics/system-metrics.yaml index a1e534e379..73cdeaa22b 100644 --- a/model/metrics/system-metrics.yaml +++ b/model/metrics/system-metrics.yaml @@ -77,6 +77,14 @@ groups: unit: "By" attributes: [] + - id: metric.system.memory.shared + type: metric + metric_name: system.memory.shared + stability: experimental + brief: "Reports shared memory." + instrument: updowncounter + unit: "By" + - id: metric.system.memory.utilization type: metric metric_name: system.memory.utilization diff --git a/model/registry/system.yaml b/model/registry/system.yaml index 19d3c60964..8033918537 100644 --- a/model/registry/system.yaml +++ b/model/registry/system.yaml @@ -65,9 +65,6 @@ groups: - id: free value: 'free' stability: experimental - - id: shared - value: 'shared' - stability: experimental - id: buffers value: 'buffers' stability: experimental From 1b1319e291fdfa9e419881139346a4737515b0ff Mon Sep 17 00:00:00 2001 From: ChrsMark Date: Tue, 23 Apr 2024 17:03:21 +0300 Subject: [PATCH 2/4] fix toc Signed-off-by: ChrsMark --- docs/attributes-registry/system.md | 1 + docs/system/system-metrics.md | 5 ++++- model/metrics/system-metrics.yaml | 2 +- model/registry/system.yaml | 4 ++++ 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/docs/attributes-registry/system.md b/docs/attributes-registry/system.md index 73ac3757bc..a7db5e3fb9 100644 --- a/docs/attributes-registry/system.md +++ b/docs/attributes-registry/system.md @@ -54,6 +54,7 @@ | `free` | free | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `buffers` | buffers | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `cached` | cached | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `shared` | shared | ![Deprecated](https://img.shields.io/badge/-deprecated-red)
Removed, report shared memory usage with `metric.system.memory.shared` metric | ## Paging attributes diff --git a/docs/system/system-metrics.md b/docs/system/system-metrics.md index 423c52c077..0938fbbe08 100644 --- a/docs/system/system-metrics.md +++ b/docs/system/system-metrics.md @@ -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) @@ -204,6 +205,7 @@ available on the system, that is `system.memory.limit`. | `free` | free | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `buffers` | buffers | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `cached` | cached | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `shared` | shared | ![Deprecated](https://img.shields.io/badge/-deprecated-red)
Removed, report shared memory usage with `metric.system.memory.shared` metric | ### Metric: `system.memory.limit` @@ -228,7 +230,7 @@ This metric is [opt-in][MetricOptIn]. | Name | Instrument Type | Unit (UCUM) | Description | Stability | | -------- | --------------- | ----------- | -------------- | --------- | -| `system.memory.shared` | UpDownCounter | `By` | Reports shared memory. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `system.memory.shared` | UpDownCounter | `By` | Reports shared memory. Memory used (mostly) by tmpfs. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | @@ -257,6 +259,7 @@ This metric is [recommended][MetricRecommended]. | `free` | free | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `buffers` | buffers | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `cached` | cached | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `shared` | shared | ![Deprecated](https://img.shields.io/badge/-deprecated-red)
Removed, report shared memory usage with `metric.system.memory.shared` metric | ## Paging/Swap Metrics diff --git a/model/metrics/system-metrics.yaml b/model/metrics/system-metrics.yaml index 73cdeaa22b..d4abffc4da 100644 --- a/model/metrics/system-metrics.yaml +++ b/model/metrics/system-metrics.yaml @@ -81,7 +81,7 @@ groups: type: metric metric_name: system.memory.shared stability: experimental - brief: "Reports shared memory." + brief: "Reports shared memory. Memory used (mostly) by tmpfs." instrument: updowncounter unit: "By" diff --git a/model/registry/system.yaml b/model/registry/system.yaml index 8033918537..9f64cc4519 100644 --- a/model/registry/system.yaml +++ b/model/registry/system.yaml @@ -71,6 +71,10 @@ groups: - id: cached value: 'cached' stability: experimental + - id: shared + value: 'shared' + stability: experimental + deprecated: 'Removed, report shared memory usage with `metric.system.memory.shared` metric' stability: experimental brief: "The memory state" examples: ["free", "cached"] From fa328236a521a06a157a502d0ffaea7bf37db8d0 Mon Sep 17 00:00:00 2001 From: ChrsMark Date: Mon, 29 Apr 2024 11:19:46 +0300 Subject: [PATCH 3/4] fix changelog Signed-off-by: ChrsMark --- .chloggen/decouple_shared_memory_metric.yaml | 2 +- docs/attributes-registry/system.md | 2 +- docs/system/system-metrics.md | 4 ++-- model/registry/system.yaml | 8 ++++---- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.chloggen/decouple_shared_memory_metric.yaml b/.chloggen/decouple_shared_memory_metric.yaml index 99f1e15a55..5f5fb7be4e 100755 --- a/.chloggen/decouple_shared_memory_metric.yaml +++ b/.chloggen/decouple_shared_memory_metric.yaml @@ -10,7 +10,7 @@ change_type: 'breaking' component: system # A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Remove `shared` from `system.memory.state` values and make it a standalone metric +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. diff --git a/docs/attributes-registry/system.md b/docs/attributes-registry/system.md index a7db5e3fb9..a836fce9a9 100644 --- a/docs/attributes-registry/system.md +++ b/docs/attributes-registry/system.md @@ -52,9 +52,9 @@ |---|---|---| | `used` | used | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `free` | free | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `shared` | shared | ![Deprecated](https://img.shields.io/badge/-deprecated-red)
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) | -| `shared` | shared | ![Deprecated](https://img.shields.io/badge/-deprecated-red)
Removed, report shared memory usage with `metric.system.memory.shared` metric | ## Paging attributes diff --git a/docs/system/system-metrics.md b/docs/system/system-metrics.md index 0938fbbe08..2c604cefc9 100644 --- a/docs/system/system-metrics.md +++ b/docs/system/system-metrics.md @@ -203,9 +203,9 @@ 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 | ![Deprecated](https://img.shields.io/badge/-deprecated-red)
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) | -| `shared` | shared | ![Deprecated](https://img.shields.io/badge/-deprecated-red)
Removed, report shared memory usage with `metric.system.memory.shared` metric | ### Metric: `system.memory.limit` @@ -257,9 +257,9 @@ 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 | ![Deprecated](https://img.shields.io/badge/-deprecated-red)
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) | -| `shared` | shared | ![Deprecated](https://img.shields.io/badge/-deprecated-red)
Removed, report shared memory usage with `metric.system.memory.shared` metric | ## Paging/Swap Metrics diff --git a/model/registry/system.yaml b/model/registry/system.yaml index 9f64cc4519..0766d4c8b2 100644 --- a/model/registry/system.yaml +++ b/model/registry/system.yaml @@ -65,16 +65,16 @@ groups: - id: free value: 'free' stability: experimental + - id: shared + value: 'shared' + stability: experimental + deprecated: 'Removed, report shared memory usage with `metric.system.memory.shared` metric' - id: buffers value: 'buffers' stability: experimental - id: cached value: 'cached' stability: experimental - - id: shared - value: 'shared' - stability: experimental - deprecated: 'Removed, report shared memory usage with `metric.system.memory.shared` metric' stability: experimental brief: "The memory state" examples: ["free", "cached"] From dfbbb634f4c2052ac77e25fc56d089953804e755 Mon Sep 17 00:00:00 2001 From: ChrsMark Date: Tue, 30 Apr 2024 09:49:25 +0300 Subject: [PATCH 4/4] improve description Signed-off-by: ChrsMark --- docs/system/system-metrics.md | 5 ++++- model/metrics/system-metrics.yaml | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/system/system-metrics.md b/docs/system/system-metrics.md index 2c604cefc9..91f4606aa9 100644 --- a/docs/system/system-metrics.md +++ b/docs/system/system-metrics.md @@ -230,7 +230,10 @@ This metric is [opt-in][MetricOptIn]. | Name | Instrument Type | Unit (UCUM) | Description | Stability | | -------- | --------------- | ----------- | -------------- | --------- | -| `system.memory.shared` | UpDownCounter | `By` | Reports shared memory. Memory used (mostly) by tmpfs. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `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)" diff --git a/model/metrics/system-metrics.yaml b/model/metrics/system-metrics.yaml index d4abffc4da..7d0ab1eb96 100644 --- a/model/metrics/system-metrics.yaml +++ b/model/metrics/system-metrics.yaml @@ -81,7 +81,10 @@ groups: type: metric metric_name: system.memory.shared stability: experimental - brief: "Reports shared memory. Memory used (mostly) by tmpfs." + 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"