Skip to content

Commit

Permalink
move common hardware attributes and metrics to registry (#1030)
Browse files Browse the repository at this point in the history
Co-authored-by: Liudmila Molkova <[email protected]>
  • Loading branch information
trisch-me and lmolkova committed Aug 5, 2024
1 parent 8c918fb commit dff7b22
Show file tree
Hide file tree
Showing 11 changed files with 624 additions and 40 deletions.
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ body:
- area:gen-ai
- area:go
- area:graphql
- area:hardware
- area:heroku
- area:host
- area:http
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/change_proposal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ body:
- area:gen-ai
- area:go
- area:graphql
- area:hardware
- area:heroku
- area:host
- area:http
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/new-conventions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ body:
- area:gen-ai
- area:go
- area:graphql
- area:hardware
- area:heroku
- area:host
- area:http
Expand Down
1 change: 1 addition & 0 deletions docs/attributes-registry/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ Currently, the following namespaces exist:
- [Gen AI](gen-ai.md)
- [Go](go.md)
- [GraphQL](graphql.md)
- [Hardware](hardware.md)
- [Heroku](heroku.md)
- [Host](host.md)
- [HTTP](http.md)
Expand Down
48 changes: 48 additions & 0 deletions docs/attributes-registry/hardware.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<!--- Hugo front matter used to generate the website version of this page:
--->

<!-- NOTE: THIS FILE IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
<!-- see templates/registry/markdown/attribute_namespace.md.j2 -->

# Hardware

## Hardware Attributes

Attributes for hardware.

| Attribute | Type | Description | Examples | Stability |
| ----------- | ------ | ---------------------------------------------------------------------------------------------------------------- | ----------------------------------- | ---------------------------------------------------------------- |
| `hw.id` | string | An identifier for the hardware component, unique within the monitored host | `win32battery_battery_testsysa33_1` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `hw.name` | string | An easily-recognizable name for the hardware component | `eth0` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `hw.parent` | string | Unique identifier of the parent component (typically the `hw.id` attribute of the enclosure, or disk controller) | `dellStorage_perc_0` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `hw.state` | string | The current state of the component | `ok`; `degraded`; `failed` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `hw.type` | string | Type of the component [1] | `battery`; `cpu`; `disk_controller` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |

**[1]:** 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`.

`hw.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 |
| ---------- | ----------- | ---------------------------------------------------------------- |
| `degraded` | Degraded | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `failed` | Failed | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `ok` | Ok | ![Experimental](https://img.shields.io/badge/-experimental-blue) |

`hw.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 |
| ----------------- | --------------- | ---------------------------------------------------------------- |
| `battery` | Battery | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `cpu` | CPU | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `disk_controller` | Disk controller | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `enclosure` | Enclosure | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `fan` | Fan | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `gpu` | GPU | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `logical_disk` | Logical disk | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `memory` | Memory | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `network` | Network | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `physical_disk` | Physical disk | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `power_supply` | Power supply | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `tape_drive` | Tape drive | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `temperature` | Temperature | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `voltage` | Voltage | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
17 changes: 17 additions & 0 deletions docs/hardware/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!--- Hugo front matter used to generate the website version of this page:
linkTitle: Hardware
--->

# Semantic Conventions for Hardware

**Status**: [Experimental][DocumentStatus]

This document describes instruments and attributes for common hardware level
metrics in OpenTelemetry. Consider the [general metric semantic conventions](/docs/general/metrics.md#general-metric-semantic-conventions)
when creating instruments not explicitly defined in the specification.

Semantic conventions for hardware are defined as following:

* [Common Hardware Metrics](common.md): Semantic Conventions for *common* hardware metrics.

[DocumentStatus]: https://opentelemetry.io/docs/specs/otel/document-status
Loading

0 comments on commit dff7b22

Please sign in to comment.