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

move common hardware attributes and metrics to registry #1030

Merged
merged 33 commits into from
Aug 5, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
a36b95c
add common hardware attributes
trisch-me May 10, 2024
edb94e6
add hardware to the issues
trisch-me May 10, 2024
a82ab2d
EOLs
trisch-me May 10, 2024
8765f5f
Merge branch 'main' of github.com:open-telemetry/semantic-conventions…
trisch-me May 10, 2024
2f576ae
update toc
trisch-me May 10, 2024
84cfdd8
fix violations
trisch-me May 10, 2024
26ecec6
Apply suggestions from code review
trisch-me May 11, 2024
51911cb
Merge branch 'main' into hardware_basic
trisch-me May 11, 2024
427370c
fix lint
trisch-me May 14, 2024
f586c14
Merge branch 'hardware_basic' of github.com:trisch-me/semantic-conven…
trisch-me May 14, 2024
56998ad
Merge branch 'main' into hardware_basic
trisch-me May 15, 2024
f9f2a24
Merge branch 'main' into hardware_basic
trisch-me May 17, 2024
aa9f74a
Merge branch 'main' of github.com:open-telemetry/semantic-conventions…
trisch-me May 17, 2024
20f237a
Merge branch 'main' of github.com:open-telemetry/semantic-conventions…
trisch-me May 21, 2024
8aff38f
update md files after fixing generation
trisch-me May 21, 2024
ce012f7
Merge branch 'main' of github.com:open-telemetry/semantic-conventions…
trisch-me Jun 5, 2024
4cfa4ef
review comments
trisch-me Jun 6, 2024
0f0b24a
fix lint
trisch-me Jun 6, 2024
cd8affa
Merge branch 'main' of github.com:open-telemetry/semantic-conventions…
trisch-me Jun 11, 2024
590baa4
address comments
trisch-me Jun 11, 2024
5d899b6
Merge branch 'main' into hardware_basic
trisch-me Jul 23, 2024
9d04215
add namespace to id; updare error parameters
trisch-me Jul 23, 2024
8cb3452
Merge branch 'main' into hardware_basic
trisch-me Jul 30, 2024
3900bde
Merge branch 'main' into hardware_basic
trisch-me Jul 31, 2024
d91cffe
Merge branch 'main' of github.com:open-telemetry/semantic-conventions…
trisch-me Aug 1, 2024
2a454fb
Merge branch 'main' of github.com:open-telemetry/semantic-conventions…
trisch-me Aug 2, 2024
7da5243
wording updated; stale keywords removed
trisch-me Aug 2, 2024
c6ec213
Merge branch 'hardware_basic' of github.com:trisch-me/semantic-conven…
trisch-me Aug 2, 2024
4767f96
update link to document status
trisch-me Aug 2, 2024
fbe0c4e
remove auto toc generation
trisch-me Aug 2, 2024
86a962f
fix lint
trisch-me Aug 2, 2024
45462b8
Merge branch 'main' into hardware_basic
trisch-me Aug 5, 2024
e38cf6f
Merge branch 'main' into hardware_basic
lmolkova Aug 5, 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
17 changes: 9 additions & 8 deletions docs/attributes-registry/hardware.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@

Attributes for hardware.

| Attribute | Type | Description | Examples | Stability |
| --------------- | ------ | ------------------------------------------------------------------------------------------------------------- | ----------------------------------- | ---------------------------------------------------------------- |
| `hw.error.type` | string | The type of error encountered by the component | `` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `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 `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 | `battery`; `cpu`; `disk_controller` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| 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 `id` attribute of the enclosure, or disk controller) | `dellStorage_perc_0` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
trisch-me marked this conversation as resolved.
Show resolved Hide resolved
| `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.

Expand Down
59 changes: 53 additions & 6 deletions docs/hardware/common.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,14 @@ monitored component:
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
|---|---|---|---|---|---|
| [`hw.id`](/docs/attributes-registry/hardware.md) | string | An identifier for the hardware component, unique within the monitored host | `win32battery_battery_testsysa33_1` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| [`hw.type`](/docs/attributes-registry/hardware.md) | string | Type of the component | `battery`; `cpu`; `disk_controller` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| [`hw.type`](/docs/attributes-registry/hardware.md) | string | Type of the component [1] | `battery`; `cpu`; `disk_controller` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| [`hw.name`](/docs/attributes-registry/hardware.md) | string | An easily-recognizable name for the hardware component | `eth0` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| [`hw.parent`](/docs/attributes-registry/hardware.md) | string | Unique identifier of the parent component (typically the `id` attribute of the enclosure, or disk controller) | `dellStorage_perc_0` | `Recommended` | ![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.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 |
Expand Down Expand Up @@ -97,10 +101,14 @@ 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/attributes-registry/hardware.md) | string | An identifier for the hardware component, unique within the monitored host | `win32battery_battery_testsysa33_1` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| [`hw.type`](/docs/attributes-registry/hardware.md) | string | Type of the component | `battery`; `cpu`; `disk_controller` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| [`hw.type`](/docs/attributes-registry/hardware.md) | string | Type of the component [1] | `battery`; `cpu`; `disk_controller` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| [`hw.name`](/docs/attributes-registry/hardware.md) | string | An easily-recognizable name for the hardware component | `eth0` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| [`hw.parent`](/docs/attributes-registry/hardware.md) | string | Unique identifier of the parent component (typically the `id` attribute of the enclosure, or disk controller) | `dellStorage_perc_0` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
trisch-me marked this conversation as resolved.
Show resolved Hide resolved

**[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.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 |
Expand Down Expand Up @@ -158,11 +166,42 @@ 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/attributes-registry/hardware.md) | string | An identifier for the hardware component, unique within the monitored host | `win32battery_battery_testsysa33_1` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| [`hw.type`](/docs/attributes-registry/hardware.md) | string | Type of the component | `battery`; `cpu`; `disk_controller` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| [`hw.error.type`](/docs/attributes-registry/hardware.md) | string | The type of error encountered by the component | `` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| [`hw.type`](/docs/attributes-registry/hardware.md) | string | Type of the component [1] | `battery`; `cpu`; `disk_controller` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| [`error.type`](/docs/attributes-registry/error.md) | string | Describes a class of error the operation ended with. [2] | `timeout`; `java.net.UnknownHostException`; `server_certificate_invalid`; `500` | `Recommended` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
trisch-me marked this conversation as resolved.
Show resolved Hide resolved
| [`hw.name`](/docs/attributes-registry/hardware.md) | string | An easily-recognizable name for the hardware component | `eth0` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| [`hw.parent`](/docs/attributes-registry/hardware.md) | string | Unique identifier of the parent component (typically the `id` attribute of the enclosure, or disk controller) | `dellStorage_perc_0` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
trisch-me marked this conversation as resolved.
Show resolved Hide resolved

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

**[2]:** The `error.type` SHOULD be predictable, and SHOULD have low cardinality.

When `error.type` is set to a type (e.g., an exception type), its
canonical class name identifying the type within the artifact SHOULD be used.

Instrumentations SHOULD document the list of errors they report.

The cardinality of `error.type` within one instrumentation library SHOULD be low.
Telemetry consumers that aggregate data from multiple instrumentation libraries and applications
should be prepared for `error.type` to have high cardinality at query time when no
additional filters are applied.

If the operation has completed successfully, instrumentations SHOULD NOT set `error.type`.

If a specific domain defines its own set of error identifiers (such as HTTP or gRPC status codes),
it's RECOMMENDED to:

* Use a domain-specific attribute
trisch-me marked this conversation as resolved.
Show resolved Hide resolved
* Set `error.type` to capture all errors, regardless of whether they are defined within the domain-specific set or not.



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

| Value | Description | Stability |
|---|---|---|
| `_OTHER` | A fallback error value to be used when the instrumentation doesn't define a custom value. | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |


`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 |
Expand Down Expand Up @@ -224,10 +263,14 @@ 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/attributes-registry/hardware.md) | string | An identifier for the hardware component, unique within the monitored host | `win32battery_battery_testsysa33_1` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| [`hw.type`](/docs/attributes-registry/hardware.md) | string | Type of the component | `battery`; `cpu`; `disk_controller` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| [`hw.type`](/docs/attributes-registry/hardware.md) | string | Type of the component [1] | `battery`; `cpu`; `disk_controller` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| [`hw.name`](/docs/attributes-registry/hardware.md) | string | An easily-recognizable name for the hardware component | `eth0` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| [`hw.parent`](/docs/attributes-registry/hardware.md) | string | Unique identifier of the parent component (typically the `id` attribute of the enclosure, or disk controller) | `dellStorage_perc_0` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
trisch-me marked this conversation as resolved.
Show resolved Hide resolved

**[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.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 |
Expand Down Expand Up @@ -290,10 +333,14 @@ This metric is [recommended][MetricRecommended].
|---|---|---|---|---|---|
| [`hw.id`](/docs/attributes-registry/hardware.md) | string | An identifier for the hardware component, unique within the monitored host | `win32battery_battery_testsysa33_1` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| [`hw.state`](/docs/attributes-registry/hardware.md) | string | The current state of the component | `ok`; `degraded`; `failed` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| [`hw.type`](/docs/attributes-registry/hardware.md) | string | Type of the component | `battery`; `cpu`; `disk_controller` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| [`hw.type`](/docs/attributes-registry/hardware.md) | string | Type of the component [1] | `battery`; `cpu`; `disk_controller` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| [`hw.name`](/docs/attributes-registry/hardware.md) | string | An easily-recognizable name for the hardware component | `eth0` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| [`hw.parent`](/docs/attributes-registry/hardware.md) | string | Unique identifier of the parent component (typically the `id` attribute of the enclosure, or disk controller) | `dellStorage_perc_0` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
trisch-me marked this conversation as resolved.
Show resolved Hide resolved

**[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 |
Expand Down
2 changes: 1 addition & 1 deletion model/metrics/hardware/common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ groups:
unit: "{error}"
extends: metric.hardware.attributes
attributes:
- ref: hw.error.type
- ref: error.type
requirement_level: recommended
trisch-me marked this conversation as resolved.
Show resolved Hide resolved

- id: metric.hardware.power
Expand Down
10 changes: 4 additions & 6 deletions model/registry/hardware.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,10 @@ groups:
stability: experimental
brief: >
Type of the component
- id: error.type
type: string
stability: experimental
brief: >
The type of error encountered by the component
examples: ['']
note: >
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`.
- id: state
type:
allow_custom_values: true
trisch-me marked this conversation as resolved.
Show resolved Hide resolved
Expand Down
Loading