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 the system.filesystem.limit metric #1380

Merged
merged 5 commits into from
Sep 16, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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_filesystem_limit.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

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Add the `system.filesystem.limit` 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: [127]

# (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:
61 changes: 60 additions & 1 deletion docs/system/system-metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ Resource attributes related to a host, SHOULD be reported under the `host.*` nam
- [Filesystem Metrics](#filesystem-metrics)
- [Metric: `system.filesystem.usage`](#metric-systemfilesystemusage)
- [Metric: `system.filesystem.utilization`](#metric-systemfilesystemutilization)
- [Metric: `system.filesystem.limit`](#metric-systemfilesystemlimit)
- [Network Metrics](#network-metrics)
- [Metric: `system.network.dropped`](#metric-systemnetworkdropped)
- [Metric: `system.network.packets`](#metric-systemnetworkpackets)
Expand Down Expand Up @@ -977,7 +978,12 @@ This metric is [recommended][MetricRecommended].

| Name | Instrument Type | Unit (UCUM) | Description | Stability |
| -------- | --------------- | ----------- | -------------- | --------- |
| `system.filesystem.usage` | UpDownCounter | `By` | | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `system.filesystem.usage` | UpDownCounter | `By` | [1] | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
lmolkova marked this conversation as resolved.
Show resolved Hide resolved


**[1]:** The sum over all `system.filesystem.state` values SHOULD equal the total storage
rogercoll marked this conversation as resolved.
Show resolved Hide resolved
capacity of the filesystem, that is `system.filesystem.limit`.



<!-- markdownlint-restore -->
Expand Down Expand Up @@ -1085,6 +1091,59 @@ This metric is [recommended][MetricRecommended].



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

### Metric: `system.filesystem.limit`

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

<!-- semconv metric.system.filesystem.limit(metric_table) -->
<!-- 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.filesystem.limit` | UpDownCounter | `By` | The total storage capacity of the filesystem | ![Experimental](https://img.shields.io/badge/-experimental-blue) |


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

<!-- semconv metric.system.filesystem.limit -->
<!-- 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.device`](/docs/attributes-registry/system.md) | string | The device identifier | `(identifier)` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| [`system.filesystem.mode`](/docs/attributes-registry/system.md) | string | The filesystem mode | `rw, ro` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| [`system.filesystem.mountpoint`](/docs/attributes-registry/system.md) | string | The filesystem mount path | `/mnt/data` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| [`system.filesystem.type`](/docs/attributes-registry/system.md) | string | The filesystem type | `ext4` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |

`system.filesystem.type` 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 |
|---|---|---|
| `exfat` | exfat | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `ext4` | ext4 | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `fat32` | fat32 | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `hfsplus` | hfsplus | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `ntfs` | ntfs | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `refs` | refs | ![Experimental](https://img.shields.io/badge/-experimental-blue) |



<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->
<!-- END AUTOGENERATED TEXT -->
Expand Down
16 changes: 16 additions & 0 deletions model/metrics/system-metrics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,9 @@ groups:
metric_name: system.filesystem.usage
stability: experimental
brief: ""
note: |
The sum over all `system.filesystem.state` values SHOULD equal the total storage
capacity of the filesystem, that is `system.filesystem.limit`.
instrument: updowncounter
unit: "By"
attributes:
Expand All @@ -248,6 +251,19 @@ groups:
- ref: system.filesystem.mode
- ref: system.filesystem.mountpoint

- id: metric.system.filesystem.limit
type: metric
metric_name: system.filesystem.limit
stability: experimental
brief: "The total storage capacity of the filesystem"
instrument: updowncounter
unit: "By"
attributes:
- ref: system.device
lmolkova marked this conversation as resolved.
Show resolved Hide resolved
- ref: system.filesystem.type
- ref: system.filesystem.mode
- ref: system.filesystem.mountpoint

# system.network.* metrics
- id: metric.system.network.dropped
type: metric
Expand Down
Loading