diff --git a/.chloggen/decouple_shared_memory_metric.yaml b/.chloggen/decouple_shared_memory_metric.yaml
new file mode 100755
index 0000000000..5f5fb7be4e
--- /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: 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:
diff --git a/docs/attributes-registry/system.md b/docs/attributes-registry/system.md
index 9760a9ee6b..a836fce9a9 100644
--- a/docs/attributes-registry/system.md
+++ b/docs/attributes-registry/system.md
@@ -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)
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) |
diff --git a/docs/system/system-metrics.md b/docs/system/system-metrics.md
index 8a62a0ec7d..91f4606aa9 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)
@@ -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)
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) |
@@ -222,6 +223,22 @@ 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` | 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)"
+
+
+
+
+
### Metric: `system.memory.utilization`
This metric is [recommended][MetricRecommended].
@@ -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)
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) |
diff --git a/model/metrics/system-metrics.yaml b/model/metrics/system-metrics.yaml
index a1e534e379..7d0ab1eb96 100644
--- a/model/metrics/system-metrics.yaml
+++ b/model/metrics/system-metrics.yaml
@@ -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
diff --git a/model/registry/system.yaml b/model/registry/system.yaml
index 19d3c60964..0766d4c8b2 100644
--- a/model/registry/system.yaml
+++ b/model/registry/system.yaml
@@ -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