From 64b30f10b95350e351de07e9d0f477738550c6ee Mon Sep 17 00:00:00 2001 From: Roger Coll Date: Mon, 27 May 2024 16:03:12 +0200 Subject: [PATCH 01/20] add system.linux.memory.slab to system metrics --- .chloggen/add_linux_memory_slab.yaml | 22 ++++++++++++++++++++++ docs/system/system-metrics.md | 20 ++++++++++++++++++++ model/metrics/system-metrics.yaml | 10 ++++++++++ 3 files changed, 52 insertions(+) create mode 100755 .chloggen/add_linux_memory_slab.yaml diff --git a/.chloggen/add_linux_memory_slab.yaml b/.chloggen/add_linux_memory_slab.yaml new file mode 100755 index 0000000000..9bb6a951a4 --- /dev/null +++ b/.chloggen/add_linux_memory_slab.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: 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: Add `system.linux.memory.slab` 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: [531] + +# (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/system/system-metrics.md b/docs/system/system-metrics.md index 58eb0b0b40..7320fb55ed 100644 --- a/docs/system/system-metrics.md +++ b/docs/system/system-metrics.md @@ -57,6 +57,7 @@ Resource attributes related to a host, SHOULD be reported under the `host.*` nam - [Metric: `system.process.created`](#metric-systemprocesscreated) - [`system.{os}.` - OS Specific System Metrics](#systemos---os-specific-system-metrics) - [Metric: `system.linux.memory.available`](#metric-systemlinuxmemoryavailable) + - [Metric: `system.linux.memory.slab`](#metric-systemlinuxmemoryslab) @@ -1466,6 +1467,25 @@ See also `MemAvailable` in [/proc/meminfo](https://man7.org/linux/man-pages/man5 + + + + + +### Metric: `system.linux.memory.slab` + + + + + + + + +| Name | Instrument Type | Unit (UCUM) | Description | Stability | +| -------- | --------------- | ----------- | -------------- | --------- | +| `system.linux.memory.slab` | UpDownCounter | `By` | Memory used by the Linux kernel for managing caches of frequently used objects | ![Experimental](https://img.shields.io/badge/-experimental-blue) | + + diff --git a/model/metrics/system-metrics.yaml b/model/metrics/system-metrics.yaml index 1b7a2cf28e..dc72f02658 100644 --- a/model/metrics/system-metrics.yaml +++ b/model/metrics/system-metrics.yaml @@ -340,3 +340,13 @@ groups: instrument: updowncounter unit: "By" attributes: [] + + - id: metric.system.linux.memory.slab + type: metric + metric_name: system.linux.memory.slab + stability: experimental + brief: "Memory used by the Linux kernel for managing caches of frequently used objects" + instrument: updowncounter + unit: "By" + attributes: + - ref: system.memory.state From 2b36eee90f7232e833a6fcd8b23837521b550b02 Mon Sep 17 00:00:00 2001 From: Roger Coll Date: Tue, 28 May 2024 16:32:53 +0200 Subject: [PATCH 02/20] add slab state attributes and slab limit metric --- docs/attributes-registry/system.md | 16 ++++++++++++ docs/system/system-metrics.md | 40 +++++++++++++++++++++++++++--- model/metrics/system-metrics.yaml | 21 +++++++++++++--- model/registry/system.yaml | 20 +++++++++++++++ 4 files changed, 89 insertions(+), 8 deletions(-) diff --git a/docs/attributes-registry/system.md b/docs/attributes-registry/system.md index cd1486db88..2becf3ffcd 100644 --- a/docs/attributes-registry/system.md +++ b/docs/attributes-registry/system.md @@ -10,6 +10,7 @@ - [System Cpu](#system-cpu-attributes) - [System Deprecated](#system-deprecated-attributes) - [System Filesystem](#system-filesystem-attributes) +- [System Linux Memory Slab](#system-linux-memory-slab-attributes) - [System Memory](#system-memory-attributes) - [System Network](#system-network-attributes) - [System Paging](#system-paging-attributes) @@ -91,6 +92,21 @@ Describes Filesystem attributes | `hfsplus` | hfsplus | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `ext4` | ext4 | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +## System Linux Memory Slab Attributes + +Describes Linux Slab Memory attributes + +| Attribute | Type | Description | Examples | Stability | +| -------------------------------- | ------ | --------------------------- | ------------------------------ | ---------------------------------------------------------------- | +| `system.linux.memory.slab.state` | string | The Linux slab memory state | `reclaimable`; `unreclaimable` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | + +`system.linux.memory.slab.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. + +| Value | Description | Stability | +| --------------- | ------------- | ---------------------------------------------------------------- | +| `reclaimable` | reclaimable | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `unreclaimable` | unreclaimable | ![Experimental](https://img.shields.io/badge/-experimental-blue) | + ## System Memory Attributes Describes System Memory attributes diff --git a/docs/system/system-metrics.md b/docs/system/system-metrics.md index 7320fb55ed..b88d0d9f6c 100644 --- a/docs/system/system-metrics.md +++ b/docs/system/system-metrics.md @@ -57,7 +57,8 @@ Resource attributes related to a host, SHOULD be reported under the `host.*` nam - [Metric: `system.process.created`](#metric-systemprocesscreated) - [`system.{os}.` - OS Specific System Metrics](#systemos---os-specific-system-metrics) - [Metric: `system.linux.memory.available`](#metric-systemlinuxmemoryavailable) - - [Metric: `system.linux.memory.slab`](#metric-systemlinuxmemoryslab) + - [Metric: `system.linux.memory.slab.usage`](#metric-systemlinuxmemoryslabusage) + - [Metric: `system.linux.memory.slab.limit`](#metric-systemlinuxmemoryslablimit) @@ -1472,9 +1473,36 @@ See also `MemAvailable` in [/proc/meminfo](https://man7.org/linux/man-pages/man5 -### Metric: `system.linux.memory.slab` +### Metric: `system.linux.memory.slab.usage` - + + + + + + + +| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | +|---|---|---|---|---|---| +| [`system.linux.memory.slab.state`](/docs/attributes-registry/system.md) | string | The Linux slab memory state | `reclaimable`; `unreclaimable` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | + +`system.linux.memory.slab.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. + +| Value | Description | Stability | +|---|---|---| +| `reclaimable` | reclaimable | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `unreclaimable` | unreclaimable | ![Experimental](https://img.shields.io/badge/-experimental-blue) | + + + + + + + + +### Metric: `system.linux.memory.slab.limit` + + @@ -1483,7 +1511,11 @@ See also `MemAvailable` in [/proc/meminfo](https://man7.org/linux/man-pages/man5 | Name | Instrument Type | Unit (UCUM) | Description | Stability | | -------- | --------------- | ----------- | -------------- | --------- | -| `system.linux.memory.slab` | UpDownCounter | `By` | Memory used by the Linux kernel for managing caches of frequently used objects | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `system.linux.memory.slab.limit` | UpDownCounter | `By` | Total slab memory used in the system. [1] | ![Experimental](https://img.shields.io/badge/-experimental-blue) | + + +**[1]:** Its value SHOULD equal the sum of `system.linux.memory.slab.state` over all states. + diff --git a/model/metrics/system-metrics.yaml b/model/metrics/system-metrics.yaml index dc72f02658..144b136293 100644 --- a/model/metrics/system-metrics.yaml +++ b/model/metrics/system-metrics.yaml @@ -341,12 +341,25 @@ groups: unit: "By" attributes: [] - - id: metric.system.linux.memory.slab + - id: metric.system.linux.memory.slab.usage type: metric - metric_name: system.linux.memory.slab + metric_name: system.linux.memory.slab.usage stability: experimental - brief: "Memory used by the Linux kernel for managing caches of frequently used objects" + brief: "Reports the memory used by the Linux kernel for managing caches of frequently used objects by state." + note: | + The sum over all `system.linux.memory.slab.state` values SHOULD equal the total slab memory available on the system, that is `system.linux.memory.slab.limit`. instrument: updowncounter unit: "By" attributes: - - ref: system.memory.state + - ref: system.linux.memory.slab.state + + - id: metric.system.linux.memory.slab.limit + type: metric + metric_name: system.linux.memory.slab.limit + stability: experimental + brief: "Total slab memory used in the system." + note: | + Its value SHOULD equal the sum of `system.linux.memory.slab.state` over all states. + instrument: updowncounter + unit: "By" + attributes: [] diff --git a/model/registry/system.yaml b/model/registry/system.yaml index d407f96d56..648ed70751 100644 --- a/model/registry/system.yaml +++ b/model/registry/system.yaml @@ -254,3 +254,23 @@ groups: brief: > The process state, e.g., [Linux Process State Codes](https://man7.org/linux/man-pages/man1/ps.1.html#PROCESS_STATE_CODES) examples: ["running"] + # system.linux.* attribute group + # system.linux.memory.slab* attribute group + - id: registry.system.linux.memory.slab + prefix: system.linux.memory.slab + type: attribute_group + brief: "Describes Linux Slab Memory attributes" + attributes: + - id: state + type: + allow_custom_values: false + members: + - id: reclaimable + value: 'reclaimable' + stability: experimental + - id: unreclaimable + value: 'unreclaimable' + stability: experimental + stability: experimental + brief: "The Linux slab memory state" + examples: ["reclaimable", "unreclaimable"] From f619525a767753ea44722cc2339c8a230ded9f7a Mon Sep 17 00:00:00 2001 From: Roger Coll Date: Tue, 28 May 2024 16:40:53 +0200 Subject: [PATCH 03/20] chore: update changelog --- .chloggen/add_linux_memory_slab.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.chloggen/add_linux_memory_slab.yaml b/.chloggen/add_linux_memory_slab.yaml index 9bb6a951a4..a89f3d753a 100755 --- a/.chloggen/add_linux_memory_slab.yaml +++ b/.chloggen/add_linux_memory_slab.yaml @@ -10,7 +10,7 @@ change_type: enhancement component: system # A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Add `system.linux.memory.slab` metric +note: Add `system.linux.memory.slab.usage` and `system.linux.memory.slab.limit` metrics, including the `system.linux.memory.slab.state` attributes. # 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. From cc370b644e8f51c74c8b1d55f2a037a10f4832a4 Mon Sep 17 00:00:00 2001 From: Roger Coll Date: Tue, 28 May 2024 16:49:08 +0200 Subject: [PATCH 04/20] docs: add system.linux.memory.slab.usage metric table --- docs/system/system-metrics.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/docs/system/system-metrics.md b/docs/system/system-metrics.md index b88d0d9f6c..fc3906fdb8 100644 --- a/docs/system/system-metrics.md +++ b/docs/system/system-metrics.md @@ -1475,6 +1475,27 @@ See also `MemAvailable` in [/proc/meminfo](https://man7.org/linux/man-pages/man5 ### Metric: `system.linux.memory.slab.usage` + + + + + + + +| Name | Instrument Type | Unit (UCUM) | Description | Stability | +| -------- | --------------- | ----------- | -------------- | --------- | +| `system.linux.memory.slab.usage` | UpDownCounter | `By` | Reports the memory used by the Linux kernel for managing caches of frequently used objects by state. [1] | ![Experimental](https://img.shields.io/badge/-experimental-blue) | + + +**[1]:** The sum over all `system.linux.memory.slab.state` values SHOULD equal the total slab memory available on the system, that is `system.linux.memory.slab.limit`. + + + + + + + + From b03736c7b84ea3243f8ebe22f758e426c57c3181 Mon Sep 17 00:00:00 2001 From: Roger Coll Date: Thu, 30 May 2024 09:19:04 +0200 Subject: [PATCH 05/20] docs: limit should equal the sum over usage values --- docs/system/system-metrics.md | 4 ++-- model/metrics/system-metrics.yaml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/system/system-metrics.md b/docs/system/system-metrics.md index fc3906fdb8..e9e52ba864 100644 --- a/docs/system/system-metrics.md +++ b/docs/system/system-metrics.md @@ -1487,7 +1487,7 @@ See also `MemAvailable` in [/proc/meminfo](https://man7.org/linux/man-pages/man5 | `system.linux.memory.slab.usage` | UpDownCounter | `By` | Reports the memory used by the Linux kernel for managing caches of frequently used objects by state. [1] | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -**[1]:** The sum over all `system.linux.memory.slab.state` values SHOULD equal the total slab memory available on the system, that is `system.linux.memory.slab.limit`. +**[1]:** The sum over all `system.linux.memory.slab.usage` state values SHOULD equal the total slab memory available on the system, that is `system.linux.memory.slab.limit`. @@ -1535,7 +1535,7 @@ See also `MemAvailable` in [/proc/meminfo](https://man7.org/linux/man-pages/man5 | `system.linux.memory.slab.limit` | UpDownCounter | `By` | Total slab memory used in the system. [1] | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -**[1]:** Its value SHOULD equal the sum of `system.linux.memory.slab.state` over all states. +**[1]:** Its value SHOULD equal the sum of `system.linux.memory.slab.usage` over all states. diff --git a/model/metrics/system-metrics.yaml b/model/metrics/system-metrics.yaml index 144b136293..8690ff86a0 100644 --- a/model/metrics/system-metrics.yaml +++ b/model/metrics/system-metrics.yaml @@ -347,7 +347,7 @@ groups: stability: experimental brief: "Reports the memory used by the Linux kernel for managing caches of frequently used objects by state." note: | - The sum over all `system.linux.memory.slab.state` values SHOULD equal the total slab memory available on the system, that is `system.linux.memory.slab.limit`. + The sum over all `system.linux.memory.slab.usage` state values SHOULD equal the total slab memory available on the system, that is `system.linux.memory.slab.limit`. instrument: updowncounter unit: "By" attributes: @@ -359,7 +359,7 @@ groups: stability: experimental brief: "Total slab memory used in the system." note: | - Its value SHOULD equal the sum of `system.linux.memory.slab.state` over all states. + Its value SHOULD equal the sum of `system.linux.memory.slab.usage` over all states. instrument: updowncounter unit: "By" attributes: [] From 21df9ac117f86cd108c6d63018f1e09778deed26 Mon Sep 17 00:00:00 2001 From: Roger Coll Date: Tue, 4 Jun 2024 08:37:06 +0200 Subject: [PATCH 06/20] remove ignored custom_values property Co-authored-by: Liudmila Molkova --- model/registry/system.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/model/registry/system.yaml b/model/registry/system.yaml index 648ed70751..5772e36934 100644 --- a/model/registry/system.yaml +++ b/model/registry/system.yaml @@ -263,7 +263,6 @@ groups: attributes: - id: state type: - allow_custom_values: false members: - id: reclaimable value: 'reclaimable' From d2361d64890c9c404229d93bee80d46498c8da0b Mon Sep 17 00:00:00 2001 From: Roger Coll Date: Tue, 4 Jun 2024 08:37:21 +0200 Subject: [PATCH 07/20] Update model/metrics/system-metrics.yaml Co-authored-by: Liudmila Molkova --- model/metrics/system-metrics.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model/metrics/system-metrics.yaml b/model/metrics/system-metrics.yaml index 8690ff86a0..ddcb888def 100644 --- a/model/metrics/system-metrics.yaml +++ b/model/metrics/system-metrics.yaml @@ -359,7 +359,7 @@ groups: stability: experimental brief: "Total slab memory used in the system." note: | - Its value SHOULD equal the sum of `system.linux.memory.slab.usage` over all states. + Its value SHOULD be equal to the sum of `system.linux.memory.slab.usage` over all states. instrument: updowncounter unit: "By" attributes: [] From d3b34235a4f55ae4b0a18a3cff529c2a9ecd246f Mon Sep 17 00:00:00 2001 From: Roger Coll Date: Tue, 4 Jun 2024 08:37:43 +0200 Subject: [PATCH 08/20] Update model/metrics/system-metrics.yaml Co-authored-by: Liudmila Molkova --- model/metrics/system-metrics.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model/metrics/system-metrics.yaml b/model/metrics/system-metrics.yaml index ddcb888def..6b2fa8147f 100644 --- a/model/metrics/system-metrics.yaml +++ b/model/metrics/system-metrics.yaml @@ -347,7 +347,7 @@ groups: stability: experimental brief: "Reports the memory used by the Linux kernel for managing caches of frequently used objects by state." note: | - The sum over all `system.linux.memory.slab.usage` state values SHOULD equal the total slab memory available on the system, that is `system.linux.memory.slab.limit`. + The sum over all `system.linux.memory.slab.usage` state values SHOULD be equal to the total slab memory available on the system, that is `system.linux.memory.slab.limit`. instrument: updowncounter unit: "By" attributes: From a8cf5d42faa5c9fa0e86b540fc7e0bdd7d3cfe59 Mon Sep 17 00:00:00 2001 From: Roger Coll Date: Tue, 4 Jun 2024 08:43:08 +0200 Subject: [PATCH 09/20] Update model/metrics/system-metrics.yaml Co-authored-by: Liudmila Molkova --- model/metrics/system-metrics.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model/metrics/system-metrics.yaml b/model/metrics/system-metrics.yaml index 6b2fa8147f..f783561a56 100644 --- a/model/metrics/system-metrics.yaml +++ b/model/metrics/system-metrics.yaml @@ -345,7 +345,7 @@ groups: type: metric metric_name: system.linux.memory.slab.usage stability: experimental - brief: "Reports the memory used by the Linux kernel for managing caches of frequently used objects by state." + brief: "Reports the memory used by the Linux kernel for managing caches of frequently used objects." note: | The sum over all `system.linux.memory.slab.usage` state values SHOULD be equal to the total slab memory available on the system, that is `system.linux.memory.slab.limit`. instrument: updowncounter From bd3fd25411f68d5929a590cd294661d911110143 Mon Sep 17 00:00:00 2001 From: Roger Coll Date: Tue, 4 Jun 2024 08:53:29 +0200 Subject: [PATCH 10/20] docs: add recommended metric requirement level --- docs/system/system-metrics.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/docs/system/system-metrics.md b/docs/system/system-metrics.md index d6ac7d13b5..517ed4d5ea 100644 --- a/docs/system/system-metrics.md +++ b/docs/system/system-metrics.md @@ -1475,6 +1475,8 @@ See also `MemAvailable` in [/proc/meminfo](https://man7.org/linux/man-pages/man5 ### Metric: `system.linux.memory.slab.usage` +This metric is [recommended][MetricRecommended]. + @@ -1484,10 +1486,10 @@ See also `MemAvailable` in [/proc/meminfo](https://man7.org/linux/man-pages/man5 | Name | Instrument Type | Unit (UCUM) | Description | Stability | | -------- | --------------- | ----------- | -------------- | --------- | -| `system.linux.memory.slab.usage` | UpDownCounter | `By` | Reports the memory used by the Linux kernel for managing caches of frequently used objects by state. [1] | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `system.linux.memory.slab.usage` | UpDownCounter | `By` | Reports the memory used by the Linux kernel for managing caches of frequently used objects. [1] | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -**[1]:** The sum over all `system.linux.memory.slab.usage` state values SHOULD equal the total slab memory available on the system, that is `system.linux.memory.slab.limit`. +**[1]:** The sum over all `system.linux.memory.slab.usage` state values SHOULD be equal to the total slab memory available on the system, that is `system.linux.memory.slab.limit`. @@ -1523,6 +1525,8 @@ See also `MemAvailable` in [/proc/meminfo](https://man7.org/linux/man-pages/man5 ### Metric: `system.linux.memory.slab.limit` +This metric is [recommended][MetricRecommended]. + @@ -1535,7 +1539,7 @@ See also `MemAvailable` in [/proc/meminfo](https://man7.org/linux/man-pages/man5 | `system.linux.memory.slab.limit` | UpDownCounter | `By` | Total slab memory used in the system. [1] | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -**[1]:** Its value SHOULD equal the sum of `system.linux.memory.slab.usage` over all states. +**[1]:** Its value SHOULD be equal to the sum of `system.linux.memory.slab.usage` over all states. From 806a9b6d3fe2b55b560b45e26ccbff9ad7942df5 Mon Sep 17 00:00:00 2001 From: Roger Coll Date: Thu, 6 Jun 2024 17:14:48 +0200 Subject: [PATCH 11/20] remove system.linux.memory.slab.limit metric The total slab memory is not constant, thus removing the limit metric. Note that the total can be derived from the sum of reclaimable + unreclaimable usage states. --- docs/system/system-metrics.md | 28 +--------------------------- model/metrics/system-metrics.yaml | 13 +------------ 2 files changed, 2 insertions(+), 39 deletions(-) diff --git a/docs/system/system-metrics.md b/docs/system/system-metrics.md index 517ed4d5ea..cf92108723 100644 --- a/docs/system/system-metrics.md +++ b/docs/system/system-metrics.md @@ -58,7 +58,6 @@ Resource attributes related to a host, SHOULD be reported under the `host.*` nam - [`system.{os}.` - OS Specific System Metrics](#systemos---os-specific-system-metrics) - [Metric: `system.linux.memory.available`](#metric-systemlinuxmemoryavailable) - [Metric: `system.linux.memory.slab.usage`](#metric-systemlinuxmemoryslabusage) - - [Metric: `system.linux.memory.slab.limit`](#metric-systemlinuxmemoryslablimit) @@ -1489,7 +1488,7 @@ This metric is [recommended][MetricRecommended]. | `system.linux.memory.slab.usage` | UpDownCounter | `By` | Reports the memory used by the Linux kernel for managing caches of frequently used objects. [1] | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -**[1]:** The sum over all `system.linux.memory.slab.usage` state values SHOULD be equal to the total slab memory available on the system, that is `system.linux.memory.slab.limit`. +**[1]:** The sum over all `system.linux.memory.slab.usage` state values SHOULD be equal to the total slab memory available on the system. Note that the total slab memory is not constant and may vary over time. @@ -1518,31 +1517,6 @@ This metric is [recommended][MetricRecommended]. - - - - - -### Metric: `system.linux.memory.slab.limit` - -This metric is [recommended][MetricRecommended]. - - - - - - - - -| Name | Instrument Type | Unit (UCUM) | Description | Stability | -| -------- | --------------- | ----------- | -------------- | --------- | -| `system.linux.memory.slab.limit` | UpDownCounter | `By` | Total slab memory used in the system. [1] | ![Experimental](https://img.shields.io/badge/-experimental-blue) | - - -**[1]:** Its value SHOULD be equal to the sum of `system.linux.memory.slab.usage` over all states. - - - diff --git a/model/metrics/system-metrics.yaml b/model/metrics/system-metrics.yaml index f783561a56..9be69d5b10 100644 --- a/model/metrics/system-metrics.yaml +++ b/model/metrics/system-metrics.yaml @@ -347,19 +347,8 @@ groups: stability: experimental brief: "Reports the memory used by the Linux kernel for managing caches of frequently used objects." note: | - The sum over all `system.linux.memory.slab.usage` state values SHOULD be equal to the total slab memory available on the system, that is `system.linux.memory.slab.limit`. + The sum over all `system.linux.memory.slab.usage` state values SHOULD be equal to the total slab memory available on the system. Note that the total slab memory is not constant and may vary over time. instrument: updowncounter unit: "By" attributes: - ref: system.linux.memory.slab.state - - - id: metric.system.linux.memory.slab.limit - type: metric - metric_name: system.linux.memory.slab.limit - stability: experimental - brief: "Total slab memory used in the system." - note: | - Its value SHOULD be equal to the sum of `system.linux.memory.slab.usage` over all states. - instrument: updowncounter - unit: "By" - attributes: [] From fdc7bce0cc19a05dd7ceaead7406f76875527d18 Mon Sep 17 00:00:00 2001 From: Roger Coll Date: Thu, 6 Jun 2024 17:38:14 +0200 Subject: [PATCH 12/20] fix yaml linter by adding a new line --- model/metrics/system-metrics.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/model/metrics/system-metrics.yaml b/model/metrics/system-metrics.yaml index 9be69d5b10..4a5ad91967 100644 --- a/model/metrics/system-metrics.yaml +++ b/model/metrics/system-metrics.yaml @@ -347,7 +347,8 @@ groups: stability: experimental brief: "Reports the memory used by the Linux kernel for managing caches of frequently used objects." note: | - The sum over all `system.linux.memory.slab.usage` state values SHOULD be equal to the total slab memory available on the system. Note that the total slab memory is not constant and may vary over time. + The sum over all `system.linux.memory.slab.usage` state values SHOULD be equal to the total slab memory available on the system. + Note that the total slab memory is not constant and may vary over time. instrument: updowncounter unit: "By" attributes: From 9e2bbfd9fc65cee7ff2b46704404f55650481bcc Mon Sep 17 00:00:00 2001 From: Roger Coll Date: Thu, 6 Jun 2024 17:50:56 +0200 Subject: [PATCH 13/20] chore: remove .limit from changelog --- .chloggen/add_linux_memory_slab.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.chloggen/add_linux_memory_slab.yaml b/.chloggen/add_linux_memory_slab.yaml index a89f3d753a..10595dacf6 100755 --- a/.chloggen/add_linux_memory_slab.yaml +++ b/.chloggen/add_linux_memory_slab.yaml @@ -10,7 +10,7 @@ change_type: enhancement component: system # A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Add `system.linux.memory.slab.usage` and `system.linux.memory.slab.limit` metrics, including the `system.linux.memory.slab.state` attributes. +note: Add the `system.linux.memory.slab.usage` metric and the `system.linux.memory.slab.state` attributes. # 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. From 6b01a6fbcd79fed011cb7eae3be9f474dbe7e2c9 Mon Sep 17 00:00:00 2001 From: Roger Coll Date: Mon, 10 Jun 2024 16:59:37 +0200 Subject: [PATCH 14/20] move slab attributes to system.linux.memory group --- docs/attributes-registry/system.md | 14 +++++++------- docs/system/system-metrics.md | 8 +++++--- model/metrics/system-metrics.yaml | 5 +++-- model/registry/system.yaml | 11 +++++------ 4 files changed, 20 insertions(+), 18 deletions(-) diff --git a/docs/attributes-registry/system.md b/docs/attributes-registry/system.md index 20e2dcf65f..eacbdacba9 100644 --- a/docs/attributes-registry/system.md +++ b/docs/attributes-registry/system.md @@ -10,7 +10,7 @@ - [System Cpu](#system-cpu-attributes) - [System Deprecated](#system-deprecated-attributes) - [System Filesystem](#system-filesystem-attributes) -- [System Linux Memory Slab](#system-linux-memory-slab-attributes) +- [System Linux Memory](#system-linux-memory-attributes) - [System Memory](#system-memory-attributes) - [System Network](#system-network-attributes) - [System Paging](#system-paging-attributes) @@ -92,15 +92,15 @@ Describes Filesystem attributes | `ntfs` | ntfs | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `refs` | refs | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -## System Linux Memory Slab Attributes +## System Linux Memory Attributes -Describes Linux Slab Memory attributes +Describes Linux Memory attributes -| Attribute | Type | Description | Examples | Stability | -| -------------------------------- | ------ | --------------------------- | ------------------------------ | ---------------------------------------------------------------- | -| `system.linux.memory.slab.state` | string | The Linux slab memory state | `reclaimable`; `unreclaimable` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| Attribute | Type | Description | Examples | Stability | +| --------------------------- | ------ | ---------------------- | ------------------------------ | ---------------------------------------------------------------- | +| `system.linux.memory.state` | string | The Linux memory state | `reclaimable`; `unreclaimable` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -`system.linux.memory.slab.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. +`system.linux.memory.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. | Value | Description | Stability | | --------------- | ------------- | ---------------------------------------------------------------- | diff --git a/docs/system/system-metrics.md b/docs/system/system-metrics.md index f93df76bb4..52bb253190 100644 --- a/docs/system/system-metrics.md +++ b/docs/system/system-metrics.md @@ -1486,7 +1486,9 @@ This metric is [recommended][MetricRecommended]. | `system.linux.memory.slab.usage` | UpDownCounter | `By` | Reports the memory used by the Linux kernel for managing caches of frequently used objects. [1] | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -**[1]:** The sum over all `system.linux.memory.slab.usage` state values SHOULD be equal to the total slab memory available on the system. Note that the total slab memory is not constant and may vary over time. +**[1]:** The sum over the `reclaimable` and `unreclaimable` state values in `system.linux.memory.slab.usage` SHOULD be equal to the total slab memory available on the system. +Note that the total slab memory is not constant and may vary over time. +See also the [Slab allocator](https://blogs.oracle.com/linux/post/understanding-linux-kernel-memory-statistics) and `Slab` in [/proc/meminfo](https://man7.org/linux/man-pages/man5/proc.5.html). @@ -1504,9 +1506,9 @@ This metric is [recommended][MetricRecommended]. | Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| -| [`system.linux.memory.slab.state`](/docs/attributes-registry/system.md) | string | The Linux slab memory state | `reclaimable`; `unreclaimable` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| [`system.linux.memory.state`](/docs/attributes-registry/system.md) | string | The Linux memory state | `reclaimable`; `unreclaimable` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -`system.linux.memory.slab.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. +`system.linux.memory.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. | Value | Description | Stability | |---|---|---| diff --git a/model/metrics/system-metrics.yaml b/model/metrics/system-metrics.yaml index 4a5ad91967..b35bf74e43 100644 --- a/model/metrics/system-metrics.yaml +++ b/model/metrics/system-metrics.yaml @@ -347,9 +347,10 @@ groups: stability: experimental brief: "Reports the memory used by the Linux kernel for managing caches of frequently used objects." note: | - The sum over all `system.linux.memory.slab.usage` state values SHOULD be equal to the total slab memory available on the system. + The sum over the `reclaimable` and `unreclaimable` state values in `system.linux.memory.slab.usage` SHOULD be equal to the total slab memory available on the system. Note that the total slab memory is not constant and may vary over time. + See also the [Slab allocator](https://blogs.oracle.com/linux/post/understanding-linux-kernel-memory-statistics) and `Slab` in [/proc/meminfo](https://man7.org/linux/man-pages/man5/proc.5.html). instrument: updowncounter unit: "By" attributes: - - ref: system.linux.memory.slab.state + - ref: system.linux.memory.state diff --git a/model/registry/system.yaml b/model/registry/system.yaml index 5772e36934..192df0c30f 100644 --- a/model/registry/system.yaml +++ b/model/registry/system.yaml @@ -254,12 +254,11 @@ groups: brief: > The process state, e.g., [Linux Process State Codes](https://man7.org/linux/man-pages/man1/ps.1.html#PROCESS_STATE_CODES) examples: ["running"] - # system.linux.* attribute group - # system.linux.memory.slab* attribute group - - id: registry.system.linux.memory.slab - prefix: system.linux.memory.slab + # system.linux.memory.* attribute group + - id: registry.system.linux.memory + prefix: system.linux.memory type: attribute_group - brief: "Describes Linux Slab Memory attributes" + brief: "Describes Linux Memory attributes" attributes: - id: state type: @@ -271,5 +270,5 @@ groups: value: 'unreclaimable' stability: experimental stability: experimental - brief: "The Linux slab memory state" + brief: "The Linux memory state" examples: ["reclaimable", "unreclaimable"] From 6e116d22b36a3eb5ace28a9e3e830d0c8f333424 Mon Sep 17 00:00:00 2001 From: Roger Coll Date: Thu, 13 Jun 2024 14:21:18 +0200 Subject: [PATCH 15/20] refactor: remove system from linux.memory.state --- docs/attributes-registry/README.md | 1 + docs/attributes-registry/linux.md | 22 ++++++++++++++++++++++ docs/attributes-registry/system.md | 16 ---------------- docs/system/system-metrics.md | 6 +++--- model/metrics/system-metrics.yaml | 4 ++-- model/registry/linux.yaml | 19 +++++++++++++++++++ model/registry/system.yaml | 18 ------------------ 7 files changed, 47 insertions(+), 39 deletions(-) create mode 100644 docs/attributes-registry/linux.md create mode 100644 model/registry/linux.yaml diff --git a/docs/attributes-registry/README.md b/docs/attributes-registry/README.md index 2aa1b98447..7edafba67a 100644 --- a/docs/attributes-registry/README.md +++ b/docs/attributes-registry/README.md @@ -63,6 +63,7 @@ Currently, the following namespaces exist: - [iOS](ios.md) - [JVM](jvm.md) - [K8s](k8s.md) +- [Linux](linux.md) - [Log](log.md) - [Messaging](messaging.md) - [Network](network.md) diff --git a/docs/attributes-registry/linux.md b/docs/attributes-registry/linux.md new file mode 100644 index 0000000000..5c65b25f8f --- /dev/null +++ b/docs/attributes-registry/linux.md @@ -0,0 +1,22 @@ + + + + + +# Linux + +## Linux Memory Attributes + +Describes Linux Memory attributes + +| Attribute | Type | Description | Examples | Stability | +| -------------------- | ------ | ---------------------- | ------------------------------ | ---------------------------------------------------------------- | +| `linux.memory.state` | string | The Linux memory state | `reclaimable`; `unreclaimable` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | + +`linux.memory.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. + +| Value | Description | Stability | +| --------------- | ------------- | ---------------------------------------------------------------- | +| `reclaimable` | reclaimable | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `unreclaimable` | unreclaimable | ![Experimental](https://img.shields.io/badge/-experimental-blue) | diff --git a/docs/attributes-registry/system.md b/docs/attributes-registry/system.md index eacbdacba9..de49928773 100644 --- a/docs/attributes-registry/system.md +++ b/docs/attributes-registry/system.md @@ -10,7 +10,6 @@ - [System Cpu](#system-cpu-attributes) - [System Deprecated](#system-deprecated-attributes) - [System Filesystem](#system-filesystem-attributes) -- [System Linux Memory](#system-linux-memory-attributes) - [System Memory](#system-memory-attributes) - [System Network](#system-network-attributes) - [System Paging](#system-paging-attributes) @@ -92,21 +91,6 @@ Describes Filesystem attributes | `ntfs` | ntfs | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `refs` | refs | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -## System Linux Memory Attributes - -Describes Linux Memory attributes - -| Attribute | Type | Description | Examples | Stability | -| --------------------------- | ------ | ---------------------- | ------------------------------ | ---------------------------------------------------------------- | -| `system.linux.memory.state` | string | The Linux memory state | `reclaimable`; `unreclaimable` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | - -`system.linux.memory.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. - -| Value | Description | Stability | -| --------------- | ------------- | ---------------------------------------------------------------- | -| `reclaimable` | reclaimable | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `unreclaimable` | unreclaimable | ![Experimental](https://img.shields.io/badge/-experimental-blue) | - ## System Memory Attributes Describes System Memory attributes diff --git a/docs/system/system-metrics.md b/docs/system/system-metrics.md index 52bb253190..94acfec4fd 100644 --- a/docs/system/system-metrics.md +++ b/docs/system/system-metrics.md @@ -1486,7 +1486,7 @@ This metric is [recommended][MetricRecommended]. | `system.linux.memory.slab.usage` | UpDownCounter | `By` | Reports the memory used by the Linux kernel for managing caches of frequently used objects. [1] | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -**[1]:** The sum over the `reclaimable` and `unreclaimable` state values in `system.linux.memory.slab.usage` SHOULD be equal to the total slab memory available on the system. +**[1]:** The sum over the `reclaimable` and `unreclaimable` state values in `linux.memory.slab.usage` SHOULD be equal to the total slab memory available on the system. Note that the total slab memory is not constant and may vary over time. See also the [Slab allocator](https://blogs.oracle.com/linux/post/understanding-linux-kernel-memory-statistics) and `Slab` in [/proc/meminfo](https://man7.org/linux/man-pages/man5/proc.5.html). @@ -1506,9 +1506,9 @@ See also the [Slab allocator](https://blogs.oracle.com/linux/post/understanding- | Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| -| [`system.linux.memory.state`](/docs/attributes-registry/system.md) | string | The Linux memory state | `reclaimable`; `unreclaimable` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| [`linux.memory.state`](/docs/attributes-registry/linux.md) | string | The Linux memory state | `reclaimable`; `unreclaimable` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -`system.linux.memory.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. +`linux.memory.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. | Value | Description | Stability | |---|---|---| diff --git a/model/metrics/system-metrics.yaml b/model/metrics/system-metrics.yaml index b35bf74e43..f11a8a6f43 100644 --- a/model/metrics/system-metrics.yaml +++ b/model/metrics/system-metrics.yaml @@ -347,10 +347,10 @@ groups: stability: experimental brief: "Reports the memory used by the Linux kernel for managing caches of frequently used objects." note: | - The sum over the `reclaimable` and `unreclaimable` state values in `system.linux.memory.slab.usage` SHOULD be equal to the total slab memory available on the system. + The sum over the `reclaimable` and `unreclaimable` state values in `linux.memory.slab.usage` SHOULD be equal to the total slab memory available on the system. Note that the total slab memory is not constant and may vary over time. See also the [Slab allocator](https://blogs.oracle.com/linux/post/understanding-linux-kernel-memory-statistics) and `Slab` in [/proc/meminfo](https://man7.org/linux/man-pages/man5/proc.5.html). instrument: updowncounter unit: "By" attributes: - - ref: system.linux.memory.state + - ref: linux.memory.state diff --git a/model/registry/linux.yaml b/model/registry/linux.yaml new file mode 100644 index 0000000000..acffef2115 --- /dev/null +++ b/model/registry/linux.yaml @@ -0,0 +1,19 @@ +groups: + # linux.memory.* attribute group + - id: registry.linux.memory + prefix: linux.memory + type: attribute_group + brief: "Describes Linux Memory attributes" + attributes: + - id: state + type: + members: + - id: reclaimable + value: 'reclaimable' + stability: experimental + - id: unreclaimable + value: 'unreclaimable' + stability: experimental + stability: experimental + brief: "The Linux memory state" + examples: ["reclaimable", "unreclaimable"] diff --git a/model/registry/system.yaml b/model/registry/system.yaml index 192df0c30f..d407f96d56 100644 --- a/model/registry/system.yaml +++ b/model/registry/system.yaml @@ -254,21 +254,3 @@ groups: brief: > The process state, e.g., [Linux Process State Codes](https://man7.org/linux/man-pages/man1/ps.1.html#PROCESS_STATE_CODES) examples: ["running"] - # system.linux.memory.* attribute group - - id: registry.system.linux.memory - prefix: system.linux.memory - type: attribute_group - brief: "Describes Linux Memory attributes" - attributes: - - id: state - type: - members: - - id: reclaimable - value: 'reclaimable' - stability: experimental - - id: unreclaimable - value: 'unreclaimable' - stability: experimental - stability: experimental - brief: "The Linux memory state" - examples: ["reclaimable", "unreclaimable"] From 3ecc8db58fd968030b909a66bc4ac00ef7e20db2 Mon Sep 17 00:00:00 2001 From: Roger Coll Date: Thu, 13 Jun 2024 14:33:17 +0200 Subject: [PATCH 16/20] chore: add linux registry to issue templates --- .github/ISSUE_TEMPLATE/bug_report.yaml | 3 ++- .github/ISSUE_TEMPLATE/change_proposal.yaml | 3 ++- .github/ISSUE_TEMPLATE/new-conventions.yaml | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index 33cf248bb7..d26d6d2c6b 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -24,8 +24,8 @@ body: - area:aws - area:browser - area:client - - area:cloud - area:cloudevents + - area:cloud - area:code - area:container - area:db @@ -49,6 +49,7 @@ body: - area:http - area:jvm - area:k8s + - area:linux - area:log - area:messaging - area:network diff --git a/.github/ISSUE_TEMPLATE/change_proposal.yaml b/.github/ISSUE_TEMPLATE/change_proposal.yaml index 4429b696e6..f2e563aee1 100644 --- a/.github/ISSUE_TEMPLATE/change_proposal.yaml +++ b/.github/ISSUE_TEMPLATE/change_proposal.yaml @@ -17,8 +17,8 @@ body: - area:aws - area:browser - area:client - - area:cloud - area:cloudevents + - area:cloud - area:code - area:container - area:db @@ -42,6 +42,7 @@ body: - area:http - area:jvm - area:k8s + - area:linux - area:log - area:messaging - area:network diff --git a/.github/ISSUE_TEMPLATE/new-conventions.yaml b/.github/ISSUE_TEMPLATE/new-conventions.yaml index 1a504ea5ce..b915e5efec 100644 --- a/.github/ISSUE_TEMPLATE/new-conventions.yaml +++ b/.github/ISSUE_TEMPLATE/new-conventions.yaml @@ -26,8 +26,8 @@ body: - area:aws - area:browser - area:client - - area:cloud - area:cloudevents + - area:cloud - area:code - area:container - area:db @@ -51,6 +51,7 @@ body: - area:http - area:jvm - area:k8s + - area:linux - area:log - area:messaging - area:network From e9b99665ef1e3d9d1eb8ab46c36a14d041562792 Mon Sep 17 00:00:00 2001 From: Roger Coll Date: Thu, 13 Jun 2024 14:59:32 +0200 Subject: [PATCH 17/20] ci: fix registry attributes list --- .github/ISSUE_TEMPLATE/bug_report.yaml | 2 +- .github/ISSUE_TEMPLATE/change_proposal.yaml | 2 +- .github/ISSUE_TEMPLATE/new-conventions.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index d26d6d2c6b..0270b6a43f 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -24,8 +24,8 @@ body: - area:aws - area:browser - area:client - - area:cloudevents - area:cloud + - area:cloudevents - area:code - area:container - area:db diff --git a/.github/ISSUE_TEMPLATE/change_proposal.yaml b/.github/ISSUE_TEMPLATE/change_proposal.yaml index f2e563aee1..bef12b2833 100644 --- a/.github/ISSUE_TEMPLATE/change_proposal.yaml +++ b/.github/ISSUE_TEMPLATE/change_proposal.yaml @@ -17,8 +17,8 @@ body: - area:aws - area:browser - area:client - - area:cloudevents - area:cloud + - area:cloudevents - area:code - area:container - area:db diff --git a/.github/ISSUE_TEMPLATE/new-conventions.yaml b/.github/ISSUE_TEMPLATE/new-conventions.yaml index b915e5efec..d5798607f3 100644 --- a/.github/ISSUE_TEMPLATE/new-conventions.yaml +++ b/.github/ISSUE_TEMPLATE/new-conventions.yaml @@ -26,8 +26,8 @@ body: - area:aws - area:browser - area:client - - area:cloudevents - area:cloud + - area:cloudevents - area:code - area:container - area:db From 58fad8529029cfbf2e8a47e442179895e128cd8b Mon Sep 17 00:00:00 2001 From: Roger Coll Date: Mon, 29 Jul 2024 14:32:07 +0200 Subject: [PATCH 18/20] add linux.slab.memory.state attribute --- docs/attributes-registry/linux.md | 8 ++++---- docs/system/system-metrics.md | 4 ++-- model/metrics/system-metrics.yaml | 2 +- model/registry/linux.yaml | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/attributes-registry/linux.md b/docs/attributes-registry/linux.md index 5c65b25f8f..cf817efa8e 100644 --- a/docs/attributes-registry/linux.md +++ b/docs/attributes-registry/linux.md @@ -10,11 +10,11 @@ Describes Linux Memory attributes -| Attribute | Type | Description | Examples | Stability | -| -------------------- | ------ | ---------------------- | ------------------------------ | ---------------------------------------------------------------- | -| `linux.memory.state` | string | The Linux memory state | `reclaimable`; `unreclaimable` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| Attribute | Type | Description | Examples | Stability | +| ------------------------- | ------ | --------------------------- | ------------------------------ | ---------------------------------------------------------------- | +| `linux.memory.slab.state` | string | The Linux Slab memory state | `reclaimable`; `unreclaimable` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -`linux.memory.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. +`linux.memory.slab.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. | Value | Description | Stability | | --------------- | ------------- | ---------------------------------------------------------------- | diff --git a/docs/system/system-metrics.md b/docs/system/system-metrics.md index ab3404e7b7..46ef36db2f 100644 --- a/docs/system/system-metrics.md +++ b/docs/system/system-metrics.md @@ -1517,9 +1517,9 @@ See also the [Slab allocator](https://blogs.oracle.com/linux/post/understanding- | Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| -| [`linux.memory.state`](/docs/attributes-registry/linux.md) | string | The Linux memory state | `reclaimable`; `unreclaimable` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| [`linux.memory.slab.state`](/docs/attributes-registry/linux.md) | string | The Linux Slab memory state | `reclaimable`; `unreclaimable` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -`linux.memory.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. +`linux.memory.slab.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. | Value | Description | Stability | |---|---|---| diff --git a/model/metrics/system-metrics.yaml b/model/metrics/system-metrics.yaml index c6afe90905..9784deeece 100644 --- a/model/metrics/system-metrics.yaml +++ b/model/metrics/system-metrics.yaml @@ -355,4 +355,4 @@ groups: instrument: updowncounter unit: "By" attributes: - - ref: linux.memory.state + - ref: linux.memory.slab.state diff --git a/model/registry/linux.yaml b/model/registry/linux.yaml index acffef2115..a0f7caef79 100644 --- a/model/registry/linux.yaml +++ b/model/registry/linux.yaml @@ -5,7 +5,7 @@ groups: type: attribute_group brief: "Describes Linux Memory attributes" attributes: - - id: state + - id: slab.state type: members: - id: reclaimable @@ -15,5 +15,5 @@ groups: value: 'unreclaimable' stability: experimental stability: experimental - brief: "The Linux memory state" + brief: "The Linux Slab memory state" examples: ["reclaimable", "unreclaimable"] From d0f5562ad9b3e7fa5ae2a338dedb9caaeba519ea Mon Sep 17 00:00:00 2001 From: Roger Coll Date: Mon, 29 Jul 2024 14:34:11 +0200 Subject: [PATCH 19/20] docs: remove system namespace attribute from changelog --- .chloggen/add_linux_memory_slab.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.chloggen/add_linux_memory_slab.yaml b/.chloggen/add_linux_memory_slab.yaml index 10595dacf6..aa45987d07 100755 --- a/.chloggen/add_linux_memory_slab.yaml +++ b/.chloggen/add_linux_memory_slab.yaml @@ -10,7 +10,7 @@ change_type: enhancement component: system # A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Add the `system.linux.memory.slab.usage` metric and the `system.linux.memory.slab.state` attributes. +note: Add the `system.linux.memory.slab.usage` metric and the `linux.memory.slab.state` attributes. # 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. From a77e59d1f1ffe6cebf7622a9eee7c25a326d7ac7 Mon Sep 17 00:00:00 2001 From: Roger Coll Date: Mon, 29 Jul 2024 17:32:10 +0200 Subject: [PATCH 20/20] Update .chloggen/add_linux_memory_slab.yaml Co-authored-by: Joao Grassi <5938087+joaopgrassi@users.noreply.github.com> --- .chloggen/add_linux_memory_slab.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.chloggen/add_linux_memory_slab.yaml b/.chloggen/add_linux_memory_slab.yaml index aa45987d07..ebc232861f 100755 --- a/.chloggen/add_linux_memory_slab.yaml +++ b/.chloggen/add_linux_memory_slab.yaml @@ -7,7 +7,7 @@ change_type: enhancement # The name of the area of concern in the attributes-registry, (e.g. http, cloud, db) -component: system +component: linux # A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). note: Add the `system.linux.memory.slab.usage` metric and the `linux.memory.slab.state` attributes.