Skip to content

move all hardware metrics to their own yaml files #2380

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

Open
wants to merge 31 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
d185515
move battery metrics to it's own space
trisch-me Jun 16, 2025
3525e23
amend comment
trisch-me Jun 16, 2025
9102e64
fix failing checks
trisch-me Jun 17, 2025
6819dfb
fix failing checks
trisch-me Jun 17, 2025
567d5ed
added cpu and controller
trisch-me Jul 1, 2025
f6e700f
Merge branch 'main' of github.com:open-telemetry/semantic-conventions…
trisch-me Jul 1, 2025
97667a0
update metric names to original ones
trisch-me Jul 1, 2025
86d3dba
added enclosure
trisch-me Jul 2, 2025
d0a680a
added fan
trisch-me Jul 2, 2025
a6eb90d
added gpu
trisch-me Jul 2, 2025
687feda
added logical disk
trisch-me Jul 2, 2025
f6b1c6b
add memory and network
trisch-me Jul 2, 2025
f9514fa
add disk and power supply
trisch-me Jul 2, 2025
426a0f6
add remaining hardware components
trisch-me Jul 2, 2025
d04ee03
Merge branch 'main' of github.com:open-telemetry/semantic-conventions…
trisch-me Jul 2, 2025
58882e8
update description
trisch-me Jul 2, 2025
d3c7ca9
update battery chemistry link
trisch-me Jul 2, 2025
c2fc839
fix warnings about metric names
trisch-me Jul 2, 2025
534ac06
fix yamllint
trisch-me Jul 2, 2025
cecbe18
fix markdown warnings
trisch-me Jul 2, 2025
14ae8a2
Merge branch 'main' of github.com:open-telemetry/semantic-conventions…
trisch-me Jul 7, 2025
ea312eb
update annotations to the new format
trisch-me Jul 7, 2025
a0ba3a6
Merge branch 'main' of github.com:open-telemetry/semantic-conventions…
trisch-me Jul 8, 2025
b232681
make attributes global for all types
trisch-me Jul 9, 2025
be85a4c
remove metric and update value
trisch-me Jul 9, 2025
5c14cf3
remove metric from md file
trisch-me Jul 9, 2025
75a4b9c
Merge branch 'main' of github.com:open-telemetry/semantic-conventions…
trisch-me Jul 18, 2025
c8a46c2
adress comments
trisch-me Jul 18, 2025
5354a2b
removed original md file and replace it with link to the hardware met…
trisch-me Jul 18, 2025
32c6367
added power supply metric
trisch-me Jul 18, 2025
a46a9d8
udpate link checker to exclude removed md files
trisch-me Jul 18, 2025
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/hw_battery.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: hardware

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Move text hardware metrics to the hardware components, yaml and md files

# 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: [2380]

# (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:
3 changes: 2 additions & 1 deletion .github/workflows/reusable-link-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ jobs:
run: |
merge_base=$(git merge-base origin/${{ github.base_ref }} HEAD)
# Using lychee's default extension filter here to match when it runs against all files
modified_files=$(git diff --name-only $merge_base...${{ github.event.pull_request.head.sha }} \
# --diff-filter=d excludes deleted files
modified_files=$(git diff --name-only --diff-filter=d $merge_base...${{ github.event.pull_request.head.sha }} \
| grep -E '\.(md|mkd|mdx|mdown|mdwn|mkdn|mkdown|markdown|html|htm|txt)$' \
| tr '\n' ' ' || true)
echo "files=$modified_files" >> $GITHUB_OUTPUT
Expand Down
2 changes: 1 addition & 1 deletion docs/general/metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ The following semantic conventions surrounding metrics are defined:
* **System metrics**
* [System](/docs/system/system-metrics.md): For standard system metrics.
* [Container](/docs/system/container-metrics.md)
* [Hardware](/docs/system/hardware-metrics.md): For hardware-related metrics.
* [Hardware](/docs/hardware/README.md): For hardware-related metrics.
* [K8s](/docs/system/k8s-metrics.md): For K8s metrics.
* [Process](/docs/system/process-metrics.md): For standard process metrics.
* [Runtime Environment](/docs/runtime/README.md#metrics): For runtime environment metrics.
Expand Down
14 changes: 14 additions & 0 deletions docs/hardware/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,19 @@ Semantic conventions for hardware are defined as following:

* [Common Hardware Metrics](common.md): Semantic Conventions for *common* hardware metrics.
* [Physical Host Metrics](host.md): Semantic Conventions for *physical host* metrics.
* [Battery Metrics](battery.md): Semantic Conventions for *battery* metrics.
* [CPU Metrics](cpu.md): Semantic Conventions for *CPU* metrics.
* [Disk Controller Metrics](disk-controller.md): Semantic Conventions for *disk controller* metrics.
* [Enclosure Metrics](enclosure.md): Semantic Conventions for *enclosure* metrics.
* [Fan Metrics](fan.md): Semantic Conventions for *fan* metrics.
* [GPU Metrics](gpu.md): Semantic Conventions for *GPU* metrics.
* [Logical Disk Metrics](logical-disk.md): Semantic Conventions for *logical disk* metrics.
* [Memory Metrics](memory.md): Semantic Conventions for *memory* metrics.
* [Network Metrics](network.md): Semantic Conventions for *network* metrics.
* [Physical Disk Metrics](physical-disk.md): Semantic Conventions for *physical disk* metrics.
* [Power Supply Metrics](power-supply.md): Semantic Conventions for *power supply* metrics.
* [Tape Drive Metrics](tape-drive.md): Semantic Conventions for *tape drive* metrics.
* [Temperature Metrics](temperature.md): Semantic Conventions for *temperature* metrics.
* [Voltage Metrics](voltage.md): Semantic Conventions for *voltage* metrics.

[DocumentStatus]: https://opentelemetry.io/docs/specs/otel/document-status
261 changes: 261 additions & 0 deletions docs/hardware/battery.md

Large diffs are not rendered by default.

18 changes: 16 additions & 2 deletions docs/hardware/common.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,14 @@ This metric is [recommended][MetricRecommended].
| [`error.type`](/docs/registry/attributes/error.md) | string | The type of error encountered by the component [2] | `uncorrected`; `zero_buffer_credit`; `crc`; `bad_sector` | `Conditionally Required` if and only if an error has occurred | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
| [`hw.name`](/docs/registry/attributes/hardware.md) | string | An easily-recognizable name for the hardware component | `eth0` | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) |
| [`hw.parent`](/docs/registry/attributes/hardware.md) | string | Unique identifier of the parent component (typically the `hw.id` attribute of the enclosure, or disk controller) | `dellStorage_perc_0` | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) |
| [`network.io.direction`](/docs/registry/attributes/network.md) | string | Direction of network traffic for network errors [3] | `receive`; `transmit` | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) |

**[1] `hw.type`:** Describes the category of the hardware component for which `hw.state` is being reported. For example, `hw.type=temperature` along with `hw.state=degraded` would indicate that the temperature of the hardware component has been reported as `degraded`.

**[2] `error.type`:** The `error.type` SHOULD match the error code reported by the component, the canonical name of the error, or another low-cardinality error identifier. Instrumentations SHOULD document the list of errors they report.

**[3] `network.io.direction`:** This attribute SHOULD only be used when `hw.type` is set to `"network"` to indicate the direction of the error.

---

`error.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.
Expand Down Expand Up @@ -174,6 +177,15 @@ This metric is [recommended][MetricRecommended].
| `temperature` | Temperature | ![Development](https://img.shields.io/badge/-development-blue) |
| `voltage` | Voltage | ![Development](https://img.shields.io/badge/-development-blue) |

---

`network.io.direction` 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 |
|---|---|---|
| `receive` | receive | ![Development](https://img.shields.io/badge/-development-blue) |
| `transmit` | transmit | ![Development](https://img.shields.io/badge/-development-blue) |

<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->
<!-- END AUTOGENERATED TEXT -->
Expand Down Expand Up @@ -251,7 +263,7 @@ This metric is [recommended][MetricRecommended].
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
|---|---|---|---|---|---|
| [`hw.id`](/docs/registry/attributes/hardware.md) | string | An identifier for the hardware component, unique within the monitored host | `win32battery_battery_testsysa33_1` | `Required` | ![Development](https://img.shields.io/badge/-development-blue) |
| [`hw.state`](/docs/registry/attributes/hardware.md) | string | The current state of the component | `ok`; `degraded`; `failed` | `Required` | ![Development](https://img.shields.io/badge/-development-blue) |
| [`hw.state`](/docs/registry/attributes/hardware.md) | string | The current state of the component | `degraded`; `failed`; `needs_cleaning` | `Required` | ![Development](https://img.shields.io/badge/-development-blue) |
| [`hw.type`](/docs/registry/attributes/hardware.md) | string | Type of the component [1] | `battery`; `cpu`; `disk_controller` | `Required` | ![Development](https://img.shields.io/badge/-development-blue) |
| [`hw.name`](/docs/registry/attributes/hardware.md) | string | An easily-recognizable name for the hardware component | `eth0` | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) |
| [`hw.parent`](/docs/registry/attributes/hardware.md) | string | Unique identifier of the parent component (typically the `hw.id` attribute of the enclosure, or disk controller) | `dellStorage_perc_0` | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) |
Expand All @@ -266,7 +278,9 @@ This metric is [recommended][MetricRecommended].
|---|---|---|
| `degraded` | Degraded | ![Development](https://img.shields.io/badge/-development-blue) |
| `failed` | Failed | ![Development](https://img.shields.io/badge/-development-blue) |
| `ok` | Ok | ![Development](https://img.shields.io/badge/-development-blue) |
| `needs_cleaning` | Needs Cleaning | ![Development](https://img.shields.io/badge/-development-blue) |
| `ok` | OK | ![Development](https://img.shields.io/badge/-development-blue) |
| `predicted_failure` | Predicted Failure | ![Development](https://img.shields.io/badge/-development-blue) |

---

Expand Down
Loading
Loading