Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add system.linux.memory.slab to system metrics #1078

Merged
merged 33 commits into from
Jul 29, 2024
Merged
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
64b30f1
add system.linux.memory.slab to system metrics
rogercoll May 27, 2024
2b36eee
add slab state attributes and slab limit metric
rogercoll May 28, 2024
f619525
chore: update changelog
rogercoll May 28, 2024
cc370b6
docs: add system.linux.memory.slab.usage metric table
rogercoll May 28, 2024
b919269
Merge branch 'main' into add_linux_memory_slab
rogercoll May 28, 2024
b03736c
docs: limit should equal the sum over usage values
rogercoll May 30, 2024
7762737
Merge branch 'main' into add_linux_memory_slab
rogercoll May 30, 2024
21df9ac
remove ignored custom_values property
rogercoll Jun 4, 2024
d2361d6
Update model/metrics/system-metrics.yaml
rogercoll Jun 4, 2024
d3b3423
Update model/metrics/system-metrics.yaml
rogercoll Jun 4, 2024
a8cf5d4
Update model/metrics/system-metrics.yaml
rogercoll Jun 4, 2024
bd3fd25
docs: add recommended metric requirement level
rogercoll Jun 4, 2024
806a9b6
remove system.linux.memory.slab.limit metric
rogercoll Jun 6, 2024
fdc7bce
fix yaml linter by adding a new line
rogercoll Jun 6, 2024
be19078
Merge branch 'main' into add_linux_memory_slab
rogercoll Jun 6, 2024
9e2bbfd
chore: remove .limit from changelog
rogercoll Jun 6, 2024
c5dcf84
Merge branch 'main' into add_linux_memory_slab
rogercoll Jun 7, 2024
5cbce68
Merge branch 'main' into add_linux_memory_slab
rogercoll Jun 10, 2024
6b01a6f
move slab attributes to system.linux.memory group
rogercoll Jun 10, 2024
28d2f49
Merge branch 'main' into add_linux_memory_slab
trisch-me Jun 11, 2024
b39af41
Merge branch 'main' into add_linux_memory_slab
joaopgrassi Jun 13, 2024
6e116d2
refactor: remove system from linux.memory.state
rogercoll Jun 13, 2024
3ecc8db
chore: add linux registry to issue templates
rogercoll Jun 13, 2024
e9b9966
ci: fix registry attributes list
rogercoll Jun 13, 2024
5a78ced
Merge branch 'main' into add_linux_memory_slab
rogercoll Jun 17, 2024
19d74f4
Merge branch 'main' into add_linux_memory_slab
joaopgrassi Jul 8, 2024
48b8987
Merge branch 'main' into add_linux_memory_slab
rogercoll Jul 18, 2024
a7fcd97
Merge branch 'main' into add_linux_memory_slab
rogercoll Jul 26, 2024
58fad85
add linux.slab.memory.state attribute
rogercoll Jul 29, 2024
d0f5562
docs: remove system namespace attribute from changelog
rogercoll Jul 29, 2024
56fb3a2
Merge branch 'main' into add_linux_memory_slab
rogercoll Jul 29, 2024
2f321ea
Merge branch 'main' into add_linux_memory_slab
joaopgrassi Jul 29, 2024
a77e59d
Update .chloggen/add_linux_memory_slab.yaml
rogercoll Jul 29, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .chloggen/add_linux_memory_slab.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: enhancement

# The name of the area of concern in the attributes-registry, (e.g. http, cloud, db)
component: system
rogercoll marked this conversation as resolved.
Show resolved Hide resolved

# 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.

# 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:
16 changes: 16 additions & 0 deletions docs/attributes-registry/system.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
- [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)
Expand Down Expand Up @@ -91,6 +92,21 @@ 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
Expand Down
53 changes: 53 additions & 0 deletions docs/system/system-metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.usage`](#metric-systemlinuxmemoryslabusage)

<!-- tocstop -->

Expand Down Expand Up @@ -1464,6 +1465,58 @@ See also `MemAvailable` in [/proc/meminfo](https://man7.org/linux/man-pages/man5



<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->
<!-- END AUTOGENERATED TEXT -->
<!-- endsemconv -->

### Metric: `system.linux.memory.slab.usage`
lmolkova marked this conversation as resolved.
Show resolved Hide resolved

This metric is [recommended][MetricRecommended].

<!-- semconv metric.system.linux.memory.slab.usage(metric_table) -->
lmolkova marked this conversation as resolved.
Show resolved Hide resolved
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
<!-- see templates/registry/markdown/snippet.md.j2 -->
<!-- prettier-ignore-start -->
<!-- markdownlint-capture -->
<!-- markdownlint-disable -->

| 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. [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.
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).



<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->
<!-- END AUTOGENERATED TEXT -->
<!-- endsemconv -->

<!-- semconv metric.system.linux.memory.slab.usage(full) -->
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
<!-- see templates/registry/markdown/snippet.md.j2 -->
<!-- prettier-ignore-start -->
<!-- markdownlint-capture -->
<!-- markdownlint-disable -->

| 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) |

`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) |



<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->
<!-- END AUTOGENERATED TEXT -->
Expand Down
14 changes: 14 additions & 0 deletions model/metrics/system-metrics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -340,3 +340,17 @@ groups:
instrument: updowncounter
unit: "By"
attributes: []

- id: metric.system.linux.memory.slab.usage
lmolkova marked this conversation as resolved.
Show resolved Hide resolved
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."
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.
Note that the total slab memory is not constant and may vary over time.
joaopgrassi marked this conversation as resolved.
Show resolved Hide resolved
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
18 changes: 18 additions & 0 deletions model/registry/system.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -254,3 +254,21 @@ 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
lmolkova marked this conversation as resolved.
Show resolved Hide resolved
type:
members:
- id: reclaimable
value: 'reclaimable'
stability: experimental
- id: unreclaimable
value: 'unreclaimable'
stability: experimental
stability: experimental
brief: "The Linux memory state"
examples: ["reclaimable", "unreclaimable"]
Loading