Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 011b5a2

Browse files
authoredMar 4, 2025··
Merge branch 'main' into karlie/resourcetiming
2 parents f6cddd0 + efb6ccd commit 011b5a2

35 files changed

+646
-231
lines changed
 

‎.chloggen/1646.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
change_type: breaking
2+
component: code
3+
note: "`code.function.name` value should contain the fully qualified function name, `code.namespace` is now deprecated"
4+
issues: [1677]
5+
subtext:

‎.chloggen/cpu_namespace.yaml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Use this changelog template to create an entry for release notes.
2+
#
3+
# If your change doesn't affect end users you should instead start
4+
# your pull request title with [chore] or use the "Skip Changelog" label.
5+
6+
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
7+
change_type: 'breaking'
8+
9+
# The name of the area of concern in the attributes-registry, (e.g. http, cloud, db)
10+
component: system
11+
12+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
13+
note: Move CPU-related system.cpu.* metrics to CPU namespace
14+
15+
# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
16+
# The values here must be integers.
17+
issues: [1873]
18+
19+
# (Optional) One or more lines of additional information to render under the primary note.
20+
# These lines will be padded with 2 spaces and then inserted directly into the document.
21+
# Use pipe (|) for multiline entries.
22+
subtext:
+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
change_type: enhancement
2+
3+
component: k8s
4+
5+
note: How to populate resource attributes based on attributes, labels and transformation
6+
7+
issues: [236]
+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Use this changelog template to create an entry for release notes.
2+
#
3+
# If your change doesn't affect end users you should instead start
4+
# your pull request title with [chore] or use the "Skip Changelog" label.
5+
6+
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
7+
change_type: enhancement
8+
9+
# The name of the area of concern in the attributes-registry, (e.g. http, cloud, db)
10+
component: process
11+
12+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
13+
note: Adjust the semantic expectations for `process.executable.name`
14+
15+
# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
16+
# The values here must be integers.
17+
issues: [1736]
18+
19+
# (Optional) One or more lines of additional information to render under the primary note.
20+
# These lines will be padded with 2 spaces and then inserted directly into the document.
21+
# Use pipe (|) for multiline entries.
22+
subtext:

‎.github/CODEOWNERS

+4-3
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,10 @@
5959
/model/device/ @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-mobile-approvers
6060

6161
# K8s semantic conventions
62-
/docs/resource/k8s.md @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-k8s-approvers
63-
/model/k8s/ @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-k8s-approvers
64-
/docs/non-normative/k8s-migration.md @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-k8s-approvers
62+
/docs/resource/k8s.md @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-k8s-approvers
63+
/model/k8s/ @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-k8s-approvers
64+
/docs/non-normative/k8s-attributes.md @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-k8s-approvers
65+
/docs/non-normative/k8s-migration.md @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-k8s-approvers
6566

6667
# Container semantic conventions
6768
/docs/resource/container.md @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-container-approvers

‎dependencies.Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
FROM otel/weaver:v0.13.2 AS weaver
77

88
# OPA is used to test policies enforced by weaver.
9-
FROM openpolicyagent/opa:1.1.0 AS opa
9+
FROM openpolicyagent/opa:1.2.0 AS opa
1010

1111
# Semconv gen is used for backwards compatibility checks.
1212
# TODO(jsuereth): Remove this when no longer used.

‎docs/attributes-registry/code.md

+19-3
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,34 @@ These attributes provide context about source code
1414
|---|---|---|---|---|
1515
| <a id="code-column-number" href="#code-column-number">`code.column.number`</a> | int | The column number in `code.file.path` best representing the operation. It SHOULD point within the code unit named in `code.function.name`. | `16` | ![Development](https://img.shields.io/badge/-development-blue) |
1616
| <a id="code-file-path" href="#code-file-path">`code.file.path`</a> | string | The source code file name that identifies the code unit as uniquely as possible (preferably an absolute file path). | `/usr/local/MyApplication/content_root/app/index.php` | ![Development](https://img.shields.io/badge/-development-blue) |
17-
| <a id="code-function-name" href="#code-function-name">`code.function.name`</a> | string | The method or function name, or equivalent (usually rightmost part of the code unit's name). | `serveRequest` | ![Development](https://img.shields.io/badge/-development-blue) |
17+
| <a id="code-function-name" href="#code-function-name">`code.function.name`</a> | string | The method or function fully-qualified name without arguments. The value should fit the natural representation of the language runtime, which is also likely the same used within `code.stacktrace` attribute value. [1] | `com.example.MyHttpService.serveRequest`; `GuzzleHttp\Client::transfer`; `fopen` | ![Development](https://img.shields.io/badge/-development-blue) |
1818
| <a id="code-line-number" href="#code-line-number">`code.line.number`</a> | int | The line number in `code.file.path` best representing the operation. It SHOULD point within the code unit named in `code.function.name`. | `42` | ![Development](https://img.shields.io/badge/-development-blue) |
19-
| <a id="code-namespace" href="#code-namespace">`code.namespace`</a> | string | The "namespace" within which `code.function.name` is defined. Usually the qualified class or module name, such that `code.namespace` + some separator + `code.function.name` form a unique identifier for the code unit. | `com.example.MyHttpService` | ![Development](https://img.shields.io/badge/-development-blue) |
2019
| <a id="code-stacktrace" href="#code-stacktrace">`code.stacktrace`</a> | string | A stacktrace as a string in the natural representation for the language runtime. The representation is to be determined and documented by each language SIG. | `at com.example.GenerateTrace.methodB(GenerateTrace.java:13)\n at com.example.GenerateTrace.methodA(GenerateTrace.java:9)\n at com.example.GenerateTrace.main(GenerateTrace.java:5)` | ![Development](https://img.shields.io/badge/-development-blue) |
2120

21+
**[1] `code.function.name`:** Values and format depends on each language runtime, thus it is impossible to provide an exhaustive list of examples.
22+
The values are usually the same (or prefixes of) the ones found in native stack trace representation stored in
23+
`code.stacktrace` without information on arguments.
24+
25+
Examples:
26+
27+
* Java method: `com.example.MyHttpService.serveRequest`
28+
* Java anonymous class method: `com.mycompany.Main$1.myMethod`
29+
* Java lambda method: `com.mycompany.Main$$Lambda/0x0000748ae4149c00.myMethod`
30+
* PHP function: `GuzzleHttp\Client::transfer
31+
* Go function: `github.com/my/repo/pkg.foo.func5`
32+
* Elixir: `OpenTelemetry.Ctx.new`
33+
* Erlang: `opentelemetry_ctx:new`
34+
* Rust: `playground::my_module::my_cool_func`
35+
* C function: `fopen`
36+
2237
## Deprecated Code Attributes
2338

2439
These deprecated attributes provide context about source code
2540

2641
| Attribute | Type | Description | Examples | Stability |
2742
|---|---|---|---|---|
2843
| <a id="code-column" href="#code-column">`code.column`</a> | int | Deprecated, use `code.column.number` | `16` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)<br>Replaced by `code.column.number` |
29-
| <a id="code-filepath" href="#code-filepath">`code.filepath`</a> | string | Deprecated, use `code.file.path` instead | `/usr/local/MyApplication/content_root/app/index.php` | ![Development](https://img.shields.io/badge/-development-blue) |
44+
| <a id="code-filepath" href="#code-filepath">`code.filepath`</a> | string | Deprecated, use `code.file.path` instead | `/usr/local/MyApplication/content_root/app/index.php` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)<br>Replaced by `code.file.path` |
3045
| <a id="code-function" href="#code-function">`code.function`</a> | string | Deprecated, use `code.function.name` instead | `serveRequest` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)<br>Replaced by `code.function.name` |
3146
| <a id="code-lineno" href="#code-lineno">`code.lineno`</a> | int | Deprecated, use `code.line.number` instead | `42` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)<br>Replaced by `code.line.number` |
47+
| <a id="code-namespace" href="#code-namespace">`code.namespace`</a> | string | Deprecated, namespace is now included into `code.function.name` | `com.example.MyHttpService` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)<br>Value should be included in `code.function.name` which is expected to be a fully-qualified name. |

‎docs/attributes-registry/cpu.md

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Attributes specific to a cpu instance.
99

1010
| Attribute | Type | Description | Examples | Stability |
1111
|---|---|---|---|---|
12+
| <a id="cpu-logical-number" href="#cpu-logical-number">`cpu.logical_number`</a> | int | The logical CPU number [0..n-1] | `1` | ![Development](https://img.shields.io/badge/-development-blue) |
1213
| <a id="cpu-mode" href="#cpu-mode">`cpu.mode`</a> | string | The mode of the CPU | `user`; `system` | ![Development](https://img.shields.io/badge/-development-blue) |
1314

1415
---

‎docs/attributes-registry/process.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ An operating system process.
2222
| <a id="process-executable-build-id-gnu" href="#process-executable-build-id-gnu">`process.executable.build_id.gnu`</a> | string | The GNU build ID as found in the `.note.gnu.build-id` ELF section (hex string). | `c89b11207f6479603b0d49bf291c092c2b719293` | ![Development](https://img.shields.io/badge/-development-blue) |
2323
| <a id="process-executable-build-id-go" href="#process-executable-build-id-go">`process.executable.build_id.go`</a> | string | The Go build ID as retrieved by `go tool buildid <go executable>`. | `foh3mEXu7BLZjsN9pOwG/kATcXlYVCDEFouRMQed_/WwRFB1hPo9LBkekthSPG/x8hMC8emW2cCjXD0_1aY` | ![Development](https://img.shields.io/badge/-development-blue) |
2424
| <a id="process-executable-build-id-htlhash" href="#process-executable-build-id-htlhash">`process.executable.build_id.htlhash`</a> | string | Profiling specific build ID for executables. See the OTel specification for Profiles for more information. | `600DCAFE4A110000F2BF38C493F5FB92` | ![Development](https://img.shields.io/badge/-development-blue) |
25-
| <a id="process-executable-name" href="#process-executable-name">`process.executable.name`</a> | string | The name of the process executable. On Linux based systems, can be set to the `Name` in `proc/[pid]/status`. On Windows, can be set to the base name of `GetProcessImageFileNameW`. | `otelcol` | ![Development](https://img.shields.io/badge/-development-blue) |
25+
| <a id="process-executable-name" href="#process-executable-name">`process.executable.name`</a> | string | The name of the process executable. On Linux based systems, this SHOULD be set to the base name of the target of `/proc/[pid]/exe`. On Windows, this SHOULD be set to the base name of `GetProcessImageFileNameW`. | `otelcol` | ![Development](https://img.shields.io/badge/-development-blue) |
2626
| <a id="process-executable-path" href="#process-executable-path">`process.executable.path`</a> | string | The full path to the process executable. On Linux based systems, can be set to the target of `proc/[pid]/exe`. On Windows, can be set to the result of `GetProcessImageFileNameW`. | `/usr/bin/cmd/otelcol` | ![Development](https://img.shields.io/badge/-development-blue) |
2727
| <a id="process-exit-code" href="#process-exit-code">`process.exit.code`</a> | int | The exit code of the process. | `127` | ![Development](https://img.shields.io/badge/-development-blue) |
2828
| <a id="process-exit-time" href="#process-exit-time">`process.exit.time`</a> | string | The date and time the process exited, in ISO 8601 format. | `2023-11-21T09:26:12.315Z` | ![Development](https://img.shields.io/badge/-development-blue) |

‎docs/attributes-registry/system.md

+1-9
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
# System
55

66
- [General System Attributes](#general-system-attributes)
7-
- [System CPU Attributes](#system-cpu-attributes)
87
- [Filesystem Attributes](#filesystem-attributes)
98
- [System Memory Attributes](#system-memory-attributes)
109
- [System Paging Attributes](#system-paging-attributes)
@@ -19,14 +18,6 @@ Describes System attributes
1918
|---|---|---|---|---|
2019
| <a id="system-device" href="#system-device">`system.device`</a> | string | The device identifier | `(identifier)` | ![Development](https://img.shields.io/badge/-development-blue) |
2120

22-
## System CPU Attributes
23-
24-
Describes System CPU attributes
25-
26-
| Attribute | Type | Description | Examples | Stability |
27-
|---|---|---|---|---|
28-
| <a id="system-cpu-logical-number" href="#system-cpu-logical-number">`system.cpu.logical_number`</a> | int | The logical CPU number [0..n-1] | `1` | ![Development](https://img.shields.io/badge/-development-blue) |
29-
3021
## Filesystem Attributes
3122

3223
Describes Filesystem attributes
@@ -142,6 +133,7 @@ Deprecated system attributes.
142133

143134
| Attribute | Type | Description | Examples | Stability |
144135
|---|---|---|---|---|
136+
| <a id="system-cpu-logical-number" href="#system-cpu-logical-number">`system.cpu.logical_number`</a> | int | Deprecated, use `cpu.logical_number` instead. | `1` | ![Development](https://img.shields.io/badge/-development-blue) |
145137
| <a id="system-cpu-state" href="#system-cpu-state">`system.cpu.state`</a> | string | Deprecated, use `cpu.mode` instead. | `idle`; `interrupt` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)<br>Replaced by `cpu.mode` |
146138
| <a id="system-network-state" href="#system-network-state">`system.network.state`</a> | string | Deprecated, use `network.connection.state` instead. | `close_wait` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)<br>Removed, report network connection state with `network.connection.state` attribute |
147139
| <a id="system-processes-status" href="#system-processes-status">`system.processes.status`</a> | string | Deprecated, use `system.process.status` instead. | `running` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)<br>Replaced by `system.process.status`. |

‎docs/cli/cli-spans.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ additional details on how to record span status.
2929

3030
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
3131
|---|---|---|---|---|---|
32-
| [`process.executable.name`](/docs/attributes-registry/process.md) | string | The name of the process executable. On Linux based systems, can be set to the `Name` in `proc/[pid]/status`. On Windows, can be set to the base name of `GetProcessImageFileNameW`. | `otelcol` | `Required` | ![Development](https://img.shields.io/badge/-development-blue) |
32+
| [`process.executable.name`](/docs/attributes-registry/process.md) | string | The name of the process executable. On Linux based systems, this SHOULD be set to the base name of the target of `/proc/[pid]/exe`. On Windows, this SHOULD be set to the base name of `GetProcessImageFileNameW`. | `otelcol` | `Required` | ![Development](https://img.shields.io/badge/-development-blue) |
3333
| [`process.exit.code`](/docs/attributes-registry/process.md) | int | The exit code of the process. | `127` | `Required` | ![Development](https://img.shields.io/badge/-development-blue) |
3434
| [`process.pid`](/docs/attributes-registry/process.md) | int | Process identifier (PID). | `1234` | `Required` | ![Development](https://img.shields.io/badge/-development-blue) |
3535
| [`error.type`](/docs/attributes-registry/error.md) | string | Describes a class of error the operation ended with. [1] | `timeout`; `java.net.UnknownHostException`; `server_certificate_invalid`; `500` | `Conditionally Required` if and only if process.exit.code is not 0 | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
@@ -80,7 +80,7 @@ it's RECOMMENDED to:
8080

8181
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
8282
|---|---|---|---|---|---|
83-
| [`process.executable.name`](/docs/attributes-registry/process.md) | string | The name of the process executable. On Linux based systems, can be set to the `Name` in `proc/[pid]/status`. On Windows, can be set to the base name of `GetProcessImageFileNameW`. | `otelcol` | `Required` | ![Development](https://img.shields.io/badge/-development-blue) |
83+
| [`process.executable.name`](/docs/attributes-registry/process.md) | string | The name of the process executable. On Linux based systems, this SHOULD be set to the base name of the target of `/proc/[pid]/exe`. On Windows, this SHOULD be set to the base name of `GetProcessImageFileNameW`. | `otelcol` | `Required` | ![Development](https://img.shields.io/badge/-development-blue) |
8484
| [`process.exit.code`](/docs/attributes-registry/process.md) | int | The exit code of the process. | `127` | `Required` | ![Development](https://img.shields.io/badge/-development-blue) |
8585
| [`process.pid`](/docs/attributes-registry/process.md) | int | Process identifier (PID). | `1234` | `Required` | ![Development](https://img.shields.io/badge/-development-blue) |
8686
| [`error.type`](/docs/attributes-registry/error.md) | string | Describes a class of error the operation ended with. [1] | `timeout`; `java.net.UnknownHostException`; `server_certificate_invalid`; `500` | `Conditionally Required` if and only if process.exit.code is not 0 | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |

‎docs/code/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ This document defines semantic conventions for source code.
1515
> (or prior):
1616
>
1717
> * SHOULD NOT change the version of the `code` conventions that they emit by default
18-
> until the `code` semantic conventions are marked stable.
18+
> until the `code` semantic conventions are marked stable.
1919
2020
[DocumentStatus]: https://opentelemetry.io/docs/specs/otel/document-status

‎docs/general/attributes.md

+19-3
Original file line numberDiff line numberDiff line change
@@ -431,12 +431,28 @@ about the span.
431431
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
432432
|---|---|---|---|---|---|
433433
| [`code.column.number`](/docs/attributes-registry/code.md) | int | The column number in `code.file.path` best representing the operation. It SHOULD point within the code unit named in `code.function.name`. | `16` | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) |
434-
| [`code.filepath`](/docs/attributes-registry/code.md) | string | Deprecated, use `code.file.path` instead | `/usr/local/MyApplication/content_root/app/index.php` | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) |
435-
| [`code.function.name`](/docs/attributes-registry/code.md) | string | The method or function name, or equivalent (usually rightmost part of the code unit's name). | `serveRequest` | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) |
434+
| [`code.filepath`](/docs/attributes-registry/code.md) | string | Deprecated, use `code.file.path` instead | `/usr/local/MyApplication/content_root/app/index.php` | `Recommended` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)<br>Replaced by `code.file.path` |
435+
| [`code.function.name`](/docs/attributes-registry/code.md) | string | The method or function fully-qualified name without arguments. The value should fit the natural representation of the language runtime, which is also likely the same used within `code.stacktrace` attribute value. [1] | `com.example.MyHttpService.serveRequest`; `GuzzleHttp\Client::transfer`; `fopen` | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) |
436436
| [`code.line.number`](/docs/attributes-registry/code.md) | int | The line number in `code.file.path` best representing the operation. It SHOULD point within the code unit named in `code.function.name`. | `42` | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) |
437-
| [`code.namespace`](/docs/attributes-registry/code.md) | string | The "namespace" within which `code.function.name` is defined. Usually the qualified class or module name, such that `code.namespace` + some separator + `code.function.name` form a unique identifier for the code unit. | `com.example.MyHttpService` | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) |
437+
| [`code.namespace`](/docs/attributes-registry/code.md) | string | Deprecated, namespace is now included into `code.function.name` | `com.example.MyHttpService` | `Recommended` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)<br>Value should be included in `code.function.name` which is expected to be a fully-qualified name. |
438438
| [`code.stacktrace`](/docs/attributes-registry/code.md) | string | A stacktrace as a string in the natural representation for the language runtime. The representation is to be determined and documented by each language SIG. | `at com.example.GenerateTrace.methodB(GenerateTrace.java:13)\n at com.example.GenerateTrace.methodA(GenerateTrace.java:9)\n at com.example.GenerateTrace.main(GenerateTrace.java:5)` | `Opt-In` | ![Development](https://img.shields.io/badge/-development-blue) |
439439

440+
**[1] `code.function.name`:** Values and format depends on each language runtime, thus it is impossible to provide an exhaustive list of examples.
441+
The values are usually the same (or prefixes of) the ones found in native stack trace representation stored in
442+
`code.stacktrace` without information on arguments.
443+
444+
Examples:
445+
446+
* Java method: `com.example.MyHttpService.serveRequest`
447+
* Java anonymous class method: `com.mycompany.Main$1.myMethod`
448+
* Java lambda method: `com.mycompany.Main$$Lambda/0x0000748ae4149c00.myMethod`
449+
* PHP function: `GuzzleHttp\Client::transfer
450+
* Go function: `github.com/my/repo/pkg.foo.func5`
451+
* Elixir: `OpenTelemetry.Ctx.new`
452+
* Erlang: `opentelemetry_ctx:new`
453+
* Rust: `playground::my_module::my_cool_func`
454+
* C function: `fopen`
455+
440456
<!-- markdownlint-restore -->
441457
<!-- prettier-ignore-end -->
442458
<!-- END AUTOGENERATED TEXT -->

‎docs/hardware/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,6 @@ when creating instruments not explicitly defined in the specification.
1313
Semantic conventions for hardware are defined as following:
1414

1515
* [Common Hardware Metrics](common.md): Semantic Conventions for *common* hardware metrics.
16+
* [Physical Host Metrics](host.md): Semantic Conventions for *physical host* metrics.
1617

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

‎docs/hardware/host.md

+133
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
<!--- Hugo front matter used to generate the website version of this page:
2+
linkTitle: Common
3+
--->
4+
5+
# Semantic conventions for physical host metrics
6+
7+
**Status**: [Development][DocumentStatus]
8+
9+
<!-- toc -->
10+
11+
- [Physical host metrics `hw.host.*`](#physical-host-metrics-hwhost)
12+
- [Metric: `hw.host.ambient_temperature`](#metric-hwhostambient_temperature)
13+
- [Metric: `hw.host.energy`](#metric-hwhostenergy)
14+
- [Metric: `hw.host.heating_margin`](#metric-hwhostheating_margin)
15+
- [Metric: `hw.host.power`](#metric-hwhostpower)
16+
17+
<!-- tocstop -->
18+
19+
## Physical host metrics `hw.host.*`
20+
21+
Physical system as opposed to a virtual system or a container.
22+
Examples: physical server, switch or disk array.
23+
24+
### Metric: `hw.host.ambient_temperature`
25+
26+
This metric is [recommended][MetricRecommended].
27+
28+
<!-- semconv metric.hw.host.ambient_temperature -->
29+
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
30+
<!-- see templates/registry/markdown/snippet.md.j2 -->
31+
<!-- prettier-ignore-start -->
32+
<!-- markdownlint-capture -->
33+
<!-- markdownlint-disable -->
34+
35+
| Name | Instrument Type | Unit (UCUM) | Description | Stability |
36+
| -------- | --------------- | ----------- | -------------- | --------- |
37+
| `hw.host.ambient_temperature` | Gauge | `Cel` | Ambient (external) temperature of the physical host | ![Development](https://img.shields.io/badge/-development-blue) |
38+
39+
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
40+
|---|---|---|---|---|---|
41+
| [`hw.id`](/docs/attributes-registry/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) |
42+
| [`hw.name`](/docs/attributes-registry/hardware.md) | string | An easily-recognizable name for the hardware component | `eth0` | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) |
43+
| [`hw.parent`](/docs/attributes-registry/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) |
44+
45+
<!-- markdownlint-restore -->
46+
<!-- prettier-ignore-end -->
47+
<!-- END AUTOGENERATED TEXT -->
48+
<!-- endsemconv -->
49+
50+
### Metric: `hw.host.energy`
51+
52+
This metric is [recommended][MetricRecommended].
53+
54+
<!-- semconv metric.hw.host.energy -->
55+
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
56+
<!-- see templates/registry/markdown/snippet.md.j2 -->
57+
<!-- prettier-ignore-start -->
58+
<!-- markdownlint-capture -->
59+
<!-- markdownlint-disable -->
60+
61+
| Name | Instrument Type | Unit (UCUM) | Description | Stability |
62+
| -------- | --------------- | ----------- | -------------- | --------- |
63+
| `hw.host.energy` | Counter | `J` | Total energy consumed by the entire physical host, in joules [1] | ![Development](https://img.shields.io/badge/-development-blue) |
64+
65+
**[1]:** The overall energy usage of a host MUST be reported using the specific `hw.host.energy` and `hw.host.power` metrics **only**, instead of the generic `hw.energy` and `hw.power` described in the previous section, to prevent summing up overlapping values.
66+
67+
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
68+
|---|---|---|---|---|---|
69+
| [`hw.id`](/docs/attributes-registry/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) |
70+
| [`hw.name`](/docs/attributes-registry/hardware.md) | string | An easily-recognizable name for the hardware component | `eth0` | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) |
71+
| [`hw.parent`](/docs/attributes-registry/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) |
72+
73+
<!-- markdownlint-restore -->
74+
<!-- prettier-ignore-end -->
75+
<!-- END AUTOGENERATED TEXT -->
76+
<!-- endsemconv -->
77+
78+
### Metric: `hw.host.heating_margin`
79+
80+
This metric is [recommended][MetricRecommended].
81+
82+
<!-- semconv metric.hw.host.heating_margin -->
83+
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
84+
<!-- see templates/registry/markdown/snippet.md.j2 -->
85+
<!-- prettier-ignore-start -->
86+
<!-- markdownlint-capture -->
87+
<!-- markdownlint-disable -->
88+
89+
| Name | Instrument Type | Unit (UCUM) | Description | Stability |
90+
| -------- | --------------- | ----------- | -------------- | --------- |
91+
| `hw.host.heating_margin` | Gauge | `Cel` | By how many degrees Celsius the temperature of the physical host can be increased, before reaching a warning threshold on one of the internal sensors | ![Development](https://img.shields.io/badge/-development-blue) |
92+
93+
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
94+
|---|---|---|---|---|---|
95+
| [`hw.id`](/docs/attributes-registry/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) |
96+
| [`hw.name`](/docs/attributes-registry/hardware.md) | string | An easily-recognizable name for the hardware component | `eth0` | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) |
97+
| [`hw.parent`](/docs/attributes-registry/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) |
98+
99+
<!-- markdownlint-restore -->
100+
<!-- prettier-ignore-end -->
101+
<!-- END AUTOGENERATED TEXT -->
102+
<!-- endsemconv -->
103+
104+
### Metric: `hw.host.power`
105+
106+
This metric is [recommended][MetricRecommended].
107+
108+
<!-- semconv metric.hw.host.power -->
109+
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
110+
<!-- see templates/registry/markdown/snippet.md.j2 -->
111+
<!-- prettier-ignore-start -->
112+
<!-- markdownlint-capture -->
113+
<!-- markdownlint-disable -->
114+
115+
| Name | Instrument Type | Unit (UCUM) | Description | Stability |
116+
| -------- | --------------- | ----------- | -------------- | --------- |
117+
| `hw.host.power` | Gauge | `W` | Instantaneous power consumed by the entire physical host in Watts (`hw.host.energy` is preferred) [1] | ![Development](https://img.shields.io/badge/-development-blue) |
118+
119+
**[1]:** The overall energy usage of a host MUST be reported using the specific `hw.host.energy` and `hw.host.power` metrics **only**, instead of the generic `hw.energy` and `hw.power` described in the previous section, to prevent summing up overlapping values.
120+
121+
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
122+
|---|---|---|---|---|---|
123+
| [`hw.id`](/docs/attributes-registry/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) |
124+
| [`hw.name`](/docs/attributes-registry/hardware.md) | string | An easily-recognizable name for the hardware component | `eth0` | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) |
125+
| [`hw.parent`](/docs/attributes-registry/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) |
126+
127+
<!-- markdownlint-restore -->
128+
<!-- prettier-ignore-end -->
129+
<!-- END AUTOGENERATED TEXT -->
130+
<!-- endsemconv -->
131+
132+
[DocumentStatus]: https://opentelemetry.io/docs/specs/otel/document-status
133+
[MetricRecommended]: /docs/general/metric-requirement-level.md#recommended

‎docs/non-normative/k8s-attributes.md

+84
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
<!--- Hugo front matter used to generate the website version of this page:
2+
linkTitle: K8s attributes
3+
--->
4+
5+
## Specify resource attributes using Kubernetes annotations
6+
7+
All annotations with the `resource.opentelemetry.io/` prefix should be translated into the corresponding resource
8+
attributes.
9+
10+
For example, the annotation `resource.opentelemetry.io/service.name` should be translated into the `service.name`
11+
attribute.
12+
13+
## Service attributes
14+
15+
The following [service resource attributes](../attributes-registry/service.md) are recommended for Kubernetes services.
16+
17+
There are different ways to calculate the service attributes.
18+
19+
1. [Well-Known Labels](https://kubernetes.io/docs/reference/labels-annotations-taints/)
20+
2. Annotations on the pod template that have the `resource.opentelemetry.io/` prefix as described in
21+
[resource attributes using Kubernetes annotations](#specify-resource-attributes-using-kubernetes-annotations)
22+
3. A function of the Kubernetes resource attributes defined above
23+
24+
This translation can typically be done by an OpenTelemetry Collector component like the
25+
[Kubernetes Attribute Processor](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/k8sattributesprocessor).
26+
27+
Tools offering this functionality should provide an opt-in flag for the use of well-known labels,
28+
since users may not be aware that their labels are being used for this purpose.
29+
30+
Each attribute has a priority order for how it should be calculated as described below.
31+
32+
### How `service.namespace` should be calculated
33+
34+
Choose the first value found:
35+
36+
1. `pod.annotation[resource.opentelemetry.io/service.namespace]`
37+
2. `k8s.namespace.name`
38+
39+
### How `service.name` should be calculated
40+
41+
Choose the first value found:
42+
43+
- `pod.annotation[resource.opentelemetry.io/service.name]`
44+
- `pod.label[app.kubernetes.io/instance]` (well-known label
45+
[app.kubernetes.io/instance](https://kubernetes.io/docs/reference/labels-annotations-taints/#app-kubernetes-io-instance))
46+
- `pod.label[app.kubernetes.io/name]` (well-known label
47+
[app.kubernetes.io/name](https://kubernetes.io/docs/reference/labels-annotations-taints/#app-kubernetes-io-name))
48+
- `k8s.deployment.name`
49+
- `k8s.replicaset.name`
50+
- `k8s.statefulset.name`
51+
- `k8s.daemonset.name`
52+
- `k8s.cronjob.name`
53+
- `k8s.job.name`
54+
- `k8s.pod.name`
55+
- `k8s.container.name`
56+
57+
The rationale is to go from the ancestor to the descendant in the Kubernetes resource hierarchy, e.g. from `deployment`
58+
to `pod` - see [Kubernetes Object Hierarchy](https://gist.github.com/fardjad/ea3c38d566c845e0b353237d3959e365).
59+
60+
### How `service.version` should be calculated
61+
62+
Choose the first value found:
63+
64+
- `pod.annotation[resource.opentelemetry.io/service.version]`
65+
- `pod.label[app.kubernetes.io/version]` (well-known label
66+
[app.kubernetes.io/version](https://kubernetes.io/docs/reference/labels-annotations-taints/#app-kubernetes-io-version))
67+
- calculate the version using algorithm described below
68+
69+
1. calculate tag and digest using the algorithm described in the
70+
[reference library](https://github.com/distribution/reference/blob/main/reference.go)
71+
2. choose the first value found:
72+
- `<tag>@<digest>`
73+
- `<digest>`
74+
- `<tag>`
75+
76+
### How `service.instance.id` should be calculated
77+
78+
Choose the first value found:
79+
80+
- `pod.annotation[resource.opentelemetry.io/service.instance.id]`
81+
- `concat([k8s.namespace.name, k8s.pod.name, k8s.container.name], '.')`
82+
83+
Note that the container restart count is not included in the `service.instance.id` calculation, because it makes
84+
troubleshooting harder when the ID changes on every restart, e.g. in a crash loop.

‎docs/resource/k8s.md

+6
Original file line numberDiff line numberDiff line change
@@ -439,3 +439,9 @@ A ResourceQuota provides constraints that limit aggregate resource consumption p
439439
<!-- endsemconv -->
440440

441441
[DocumentStatus]: https://opentelemetry.io/docs/specs/otel/document-status
442+
443+
## Kubernetes specific guidelines
444+
445+
The following guidelines are specific to Kubernetes:
446+
447+
- [Service in Kubernetes](../non-normative/k8s-attributes.md#service-attributes)

‎docs/resource/process.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ linkTitle: Process
4242
| [`process.command`](/docs/attributes-registry/process.md) | string | The command used to launch the process (i.e. the command name). On Linux based systems, can be set to the zeroth string in `proc/[pid]/cmdline`. On Windows, can be set to the first parameter extracted from `GetCommandLineW`. | `cmd/otelcol` | `Conditionally Required` [1] | ![Development](https://img.shields.io/badge/-development-blue) |
4343
| [`process.command_args`](/docs/attributes-registry/process.md) | string[] | All the command arguments (including the command/executable itself) as received by the process. On Linux-based systems (and some other Unixoid systems supporting procfs), can be set according to the list of null-delimited strings extracted from `proc/[pid]/cmdline`. For libc-based executables, this would be the full argv vector passed to `main`. | `["cmd/otecol", "--config=config.yaml"]` | `Conditionally Required` [2] | ![Development](https://img.shields.io/badge/-development-blue) |
4444
| [`process.command_line`](/docs/attributes-registry/process.md) | string | The full command used to launch the process as a single string representing the full command. On Windows, can be set to the result of `GetCommandLineW`. Do not set this if you have to assemble it just for monitoring; use `process.command_args` instead. | `C:\cmd\otecol --config="my directory\config.yaml"` | `Conditionally Required` [3] | ![Development](https://img.shields.io/badge/-development-blue) |
45-
| [`process.executable.name`](/docs/attributes-registry/process.md) | string | The name of the process executable. On Linux based systems, can be set to the `Name` in `proc/[pid]/status`. On Windows, can be set to the base name of `GetProcessImageFileNameW`. | `otelcol` | `Conditionally Required` [4] | ![Development](https://img.shields.io/badge/-development-blue) |
45+
| [`process.executable.name`](/docs/attributes-registry/process.md) | string | The name of the process executable. On Linux based systems, this SHOULD be set to the base name of the target of `/proc/[pid]/exe`. On Windows, this SHOULD be set to the base name of `GetProcessImageFileNameW`. | `otelcol` | `Conditionally Required` [4] | ![Development](https://img.shields.io/badge/-development-blue) |
4646
| [`process.executable.path`](/docs/attributes-registry/process.md) | string | The full path to the process executable. On Linux based systems, can be set to the target of `proc/[pid]/exe`. On Windows, can be set to the result of `GetProcessImageFileNameW`. | `/usr/bin/cmd/otelcol` | `Conditionally Required` [5] | ![Development](https://img.shields.io/badge/-development-blue) |
4747
| [`process.linux.cgroup`](/docs/attributes-registry/process.md) | string | The control group associated with the process. [6] | `1:name=systemd:/user.slice/user-1000.slice/session-3.scope`; `0::/user.slice/user-1000.slice/user@1000.service/tmux-spawn-0267755b-4639-4a27-90ed-f19f88e53748.scope` | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) |
4848
| [`process.owner`](/docs/attributes-registry/process.md) | string | The username of the user that owns the process. | `root` | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) |

‎docs/system/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ System semantic conventions are defined for the following metrics:
1212

1313
* [System](system-metrics.md): For standard system metrics.
1414
* [Container](container-metrics.md): For container-related metrics.
15+
* [CPU](cpu-metrics.md): For CPU-related metrics.
1516
* [K8s](k8s-metrics.md): For K8s-related metrics.
1617
* [Hardware](hardware-metrics.md): For hardware-related metrics.
1718
* [Process](process-metrics.md): For standard process metrics.

‎docs/system/cpu-metrics.md

+133
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
<!--- Hugo front matter used to generate the website version of this page:
2+
linkTitle: CPU
3+
--->
4+
5+
# Semantic conventions for CPU metrics
6+
7+
**Status**: [Experimental][DocumentStatus]
8+
9+
This document describes instruments and attributes for common CPU level metrics
10+
in OpenTelemetry.
11+
12+
<!-- toc -->
13+
14+
- [CPU Metrics](#cpu-metrics)
15+
- [Metric: `cpu.time`](#metric-cputime)
16+
- [Metric: `cpu.utilization`](#metric-cpuutilization)
17+
- [Metric: `cpu.frequency`](#metric-cpufrequency)
18+
19+
<!-- tocstop -->
20+
21+
## CPU Metrics
22+
23+
### Metric: `cpu.time`
24+
25+
This metric is [recommended][MetricRecommended].
26+
27+
<!-- semconv metric.cpu.time -->
28+
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
29+
<!-- see templates/registry/markdown/snippet.md.j2 -->
30+
<!-- prettier-ignore-start -->
31+
<!-- markdownlint-capture -->
32+
<!-- markdownlint-disable -->
33+
34+
| Name | Instrument Type | Unit (UCUM) | Description | Stability |
35+
| -------- | --------------- | ----------- | -------------- | --------- |
36+
| `cpu.time` | Counter | `s` | Seconds each logical CPU spent on each mode | ![Development](https://img.shields.io/badge/-development-blue) |
37+
38+
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
39+
|---|---|---|---|---|---|
40+
| [`cpu.logical_number`](/docs/attributes-registry/cpu.md) | int | The logical CPU number [0..n-1] | `1` | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) |
41+
| [`cpu.mode`](/docs/attributes-registry/cpu.md) | string | The mode of the CPU [1] | `user`; `system` | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) |
42+
43+
**[1] `cpu.mode`:** Following states SHOULD be used: `user`, `system`, `nice`, `idle`, `iowait`, `interrupt`, `steal`
44+
45+
---
46+
47+
`cpu.mode` 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.
48+
49+
| Value | Description | Stability |
50+
|---|---|---|
51+
| `idle` | idle | ![Development](https://img.shields.io/badge/-development-blue) |
52+
| `interrupt` | interrupt | ![Development](https://img.shields.io/badge/-development-blue) |
53+
| `iowait` | iowait | ![Development](https://img.shields.io/badge/-development-blue) |
54+
| `kernel` | kernel | ![Development](https://img.shields.io/badge/-development-blue) |
55+
| `nice` | nice | ![Development](https://img.shields.io/badge/-development-blue) |
56+
| `steal` | steal | ![Development](https://img.shields.io/badge/-development-blue) |
57+
| `system` | system | ![Development](https://img.shields.io/badge/-development-blue) |
58+
| `user` | user | ![Development](https://img.shields.io/badge/-development-blue) |
59+
60+
<!-- markdownlint-restore -->
61+
<!-- prettier-ignore-end -->
62+
<!-- END AUTOGENERATED TEXT -->
63+
<!-- endsemconv -->
64+
65+
### Metric: `cpu.utilization`
66+
67+
This metric is [opt-in][MetricOptIn].
68+
69+
<!-- semconv metric.cpu.utilization -->
70+
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
71+
<!-- see templates/registry/markdown/snippet.md.j2 -->
72+
<!-- prettier-ignore-start -->
73+
<!-- markdownlint-capture -->
74+
<!-- markdownlint-disable -->
75+
76+
| Name | Instrument Type | Unit (UCUM) | Description | Stability |
77+
| -------- | --------------- | ----------- | -------------- | --------- |
78+
| `cpu.utilization` | Gauge | `1` | For each logical CPU, the utilization is calculated as the change in cumulative CPU time (cpu.time) over a measurement interval, divided by the elapsed time. | ![Development](https://img.shields.io/badge/-development-blue) |
79+
80+
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
81+
|---|---|---|---|---|---|
82+
| [`cpu.logical_number`](/docs/attributes-registry/cpu.md) | int | The logical CPU number [0..n-1] | `1` | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) |
83+
| [`cpu.mode`](/docs/attributes-registry/cpu.md) | string | The mode of the CPU [1] | `user`; `system` | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) |
84+
85+
**[1] `cpu.mode`:** Following modes SHOULD be used: `user`, `system`, `nice`, `idle`, `iowait`, `interrupt`, `steal`
86+
87+
---
88+
89+
`cpu.mode` 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.
90+
91+
| Value | Description | Stability |
92+
|---|---|---|
93+
| `idle` | idle | ![Development](https://img.shields.io/badge/-development-blue) |
94+
| `interrupt` | interrupt | ![Development](https://img.shields.io/badge/-development-blue) |
95+
| `iowait` | iowait | ![Development](https://img.shields.io/badge/-development-blue) |
96+
| `kernel` | kernel | ![Development](https://img.shields.io/badge/-development-blue) |
97+
| `nice` | nice | ![Development](https://img.shields.io/badge/-development-blue) |
98+
| `steal` | steal | ![Development](https://img.shields.io/badge/-development-blue) |
99+
| `system` | system | ![Development](https://img.shields.io/badge/-development-blue) |
100+
| `user` | user | ![Development](https://img.shields.io/badge/-development-blue) |
101+
102+
<!-- markdownlint-restore -->
103+
<!-- prettier-ignore-end -->
104+
<!-- END AUTOGENERATED TEXT -->
105+
<!-- endsemconv -->
106+
107+
### Metric: `cpu.frequency`
108+
109+
This metric is [recommended][MetricRecommended].
110+
111+
<!-- semconv metric.cpu.frequency -->
112+
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
113+
<!-- see templates/registry/markdown/snippet.md.j2 -->
114+
<!-- prettier-ignore-start -->
115+
<!-- markdownlint-capture -->
116+
<!-- markdownlint-disable -->
117+
118+
| Name | Instrument Type | Unit (UCUM) | Description | Stability |
119+
| -------- | --------------- | ----------- | -------------- | --------- |
120+
| `cpu.frequency` | Gauge | `Hz` | Operating frequency of the logical CPU in Hertz. | ![Development](https://img.shields.io/badge/-development-blue) |
121+
122+
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
123+
|---|---|---|---|---|---|
124+
| [`cpu.logical_number`](/docs/attributes-registry/cpu.md) | int | The logical CPU number [0..n-1] | `1` | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) |
125+
126+
<!-- markdownlint-restore -->
127+
<!-- prettier-ignore-end -->
128+
<!-- END AUTOGENERATED TEXT -->
129+
<!-- endsemconv -->
130+
131+
[DocumentStatus]: https://opentelemetry.io/docs/specs/otel/document-status
132+
[MetricOptIn]: /docs/general/metric-requirement-level.md#opt-in
133+
[MetricRecommended]: /docs/general/metric-requirement-level.md#recommended

‎docs/system/hardware-metrics.md

+1-19
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Please note that this is an [ongoing process](https://github.com/open-telemetry/
2020
- [Common hardware attributes](/docs/attributes-registry/hardware.md)
2121
- [Metric Instruments](#metric-instruments)
2222
- [`hw.` - Common hardware metrics](/docs/hardware/common.md)
23-
- [`hw.host.` - Physical host metrics](#hwhost---physical-host-metrics)
23+
- [`hw.host.` - Physical host metrics](/docs/hardware/host.md)
2424
- [`hw.battery.` - Battery metrics](#hwbattery---battery-metrics)
2525
- [`hw.cpu.` - Physical processor metrics](#hwcpu---physical-processor-metrics)
2626
- [`hw.disk_controller.` - Disk controller metrics](#hwdisk_controller---disk-controller-metrics)
@@ -49,24 +49,6 @@ Please note that this is an [ongoing process](https://github.com/open-telemetry/
4949
5050
## Metric Instruments
5151

52-
### `hw.host.` - Physical host metrics
53-
54-
**Description:** Physical system as opposed to a virtual system or a container.
55-
Examples: physical server, switch or disk array.
56-
57-
| Name | Description | Units | Instrument Type ([*](/docs/general/metrics.md#instrument-types)) | Value Type | Attribute Key(s) | Attribute Values |
58-
| ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----- | ------------------------------------------------- | ---------- | ---------------- | ---------------- |
59-
| `hw.host.ambient_temperature` | Ambient (external) temperature of the physical host | Cel | Gauge | Double | | |
60-
| `hw.host.energy` | Total energy consumed by the entire physical host, in joules | J | Counter | Int64 | | |
61-
| `hw.host.heating_margin` | By how many degrees Celsius the temperature of the physical host can be increased, before reaching a warning threshold on one of the internal sensors | Cel | Gauge | Double | | |
62-
| `hw.host.power` | Instantaneous power consumed by the entire physical host in Watts (`hw.host.energy` is preferred) | W | Gauge | Double | | |
63-
64-
> **Note**
65-
> The overall energy usage of a host MUST be reported using the specific
66-
> `hw.host.energy` and `hw.host.power` metrics **only**, instead of the generic
67-
> `hw.energy` and `hw.power` described in the previous section, to prevent
68-
> summing up overlapping values.
69-
7052
### `hw.battery.` - Battery metrics
7153

7254
**Description:** A battery in a computer system or an UPS.

‎docs/system/system-metrics.md

-111
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,8 @@ Resource attributes related to a host, SHOULD be reported under the `host.*` nam
2222
- [General Metrics](#general-metrics)
2323
- [Metric: `system.uptime`](#metric-systemuptime)
2424
- [Processor Metrics](#processor-metrics)
25-
- [Metric: `system.cpu.time`](#metric-systemcputime)
26-
- [Metric: `system.cpu.utilization`](#metric-systemcpuutilization)
2725
- [Metric: `system.cpu.physical.count`](#metric-systemcpuphysicalcount)
2826
- [Metric: `system.cpu.logical.count`](#metric-systemcpulogicalcount)
29-
- [Metric: `system.cpu.frequency`](#metric-systemcpufrequency)
3027
- [Memory Metrics](#memory-metrics)
3128
- [Metric: `system.memory.usage`](#metric-systemmemoryusage)
3229
- [Metric: `system.memory.limit`](#metric-systemmemorylimit)
@@ -102,90 +99,6 @@ The actual accuracy would depend on the instrumentation and operating system.
10299

103100
**Description:** System level processor metrics captured under the namespace `system.cpu`.
104101

105-
### Metric: `system.cpu.time`
106-
107-
This metric is [recommended][MetricRecommended].
108-
109-
<!-- semconv metric.system.cpu.time -->
110-
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
111-
<!-- see templates/registry/markdown/snippet.md.j2 -->
112-
<!-- prettier-ignore-start -->
113-
<!-- markdownlint-capture -->
114-
<!-- markdownlint-disable -->
115-
116-
| Name | Instrument Type | Unit (UCUM) | Description | Stability |
117-
| -------- | --------------- | ----------- | -------------- | --------- |
118-
| `system.cpu.time` | Counter | `s` | Seconds each logical CPU spent on each mode | ![Development](https://img.shields.io/badge/-development-blue) |
119-
120-
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
121-
|---|---|---|---|---|---|
122-
| [`cpu.mode`](/docs/attributes-registry/cpu.md) | string | The CPU mode for this data point. A system's CPU SHOULD be characterized *either* by data points with no `mode` labels, *or only* data points with `mode` labels. [1] | `user`; `system` | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) |
123-
| [`system.cpu.logical_number`](/docs/attributes-registry/system.md) | int | The logical CPU number [0..n-1] | `1` | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) |
124-
125-
**[1] `cpu.mode`:** Following states SHOULD be used: `user`, `system`, `nice`, `idle`, `iowait`, `interrupt`, `steal`
126-
127-
---
128-
129-
`cpu.mode` 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.
130-
131-
| Value | Description | Stability |
132-
|---|---|---|
133-
| `idle` | idle | ![Development](https://img.shields.io/badge/-development-blue) |
134-
| `interrupt` | interrupt | ![Development](https://img.shields.io/badge/-development-blue) |
135-
| `iowait` | iowait | ![Development](https://img.shields.io/badge/-development-blue) |
136-
| `kernel` | kernel | ![Development](https://img.shields.io/badge/-development-blue) |
137-
| `nice` | nice | ![Development](https://img.shields.io/badge/-development-blue) |
138-
| `steal` | steal | ![Development](https://img.shields.io/badge/-development-blue) |
139-
| `system` | system | ![Development](https://img.shields.io/badge/-development-blue) |
140-
| `user` | user | ![Development](https://img.shields.io/badge/-development-blue) |
141-
142-
<!-- markdownlint-restore -->
143-
<!-- prettier-ignore-end -->
144-
<!-- END AUTOGENERATED TEXT -->
145-
<!-- endsemconv -->
146-
147-
### Metric: `system.cpu.utilization`
148-
149-
This metric is [opt-in][MetricOptIn].
150-
151-
<!-- semconv metric.system.cpu.utilization -->
152-
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
153-
<!-- see templates/registry/markdown/snippet.md.j2 -->
154-
<!-- prettier-ignore-start -->
155-
<!-- markdownlint-capture -->
156-
<!-- markdownlint-disable -->
157-
158-
| Name | Instrument Type | Unit (UCUM) | Description | Stability |
159-
| -------- | --------------- | ----------- | -------------- | --------- |
160-
| `system.cpu.utilization` | Gauge | `1` | Difference in system.cpu.time since the last measurement, divided by the elapsed time and number of logical CPUs | ![Development](https://img.shields.io/badge/-development-blue) |
161-
162-
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
163-
|---|---|---|---|---|---|
164-
| [`cpu.mode`](/docs/attributes-registry/cpu.md) | string | The CPU mode for this data point. A system's CPU SHOULD be characterized *either* by data points with no `mode` labels, *or only* data points with `mode` labels. [1] | `user`; `system` | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) |
165-
| [`system.cpu.logical_number`](/docs/attributes-registry/system.md) | int | The logical CPU number [0..n-1] | `1` | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) |
166-
167-
**[1] `cpu.mode`:** Following modes SHOULD be used: `user`, `system`, `nice`, `idle`, `iowait`, `interrupt`, `steal`
168-
169-
---
170-
171-
`cpu.mode` 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.
172-
173-
| Value | Description | Stability |
174-
|---|---|---|
175-
| `idle` | idle | ![Development](https://img.shields.io/badge/-development-blue) |
176-
| `interrupt` | interrupt | ![Development](https://img.shields.io/badge/-development-blue) |
177-
| `iowait` | iowait | ![Development](https://img.shields.io/badge/-development-blue) |
178-
| `kernel` | kernel | ![Development](https://img.shields.io/badge/-development-blue) |
179-
| `nice` | nice | ![Development](https://img.shields.io/badge/-development-blue) |
180-
| `steal` | steal | ![Development](https://img.shields.io/badge/-development-blue) |
181-
| `system` | system | ![Development](https://img.shields.io/badge/-development-blue) |
182-
| `user` | user | ![Development](https://img.shields.io/badge/-development-blue) |
183-
184-
<!-- markdownlint-restore -->
185-
<!-- prettier-ignore-end -->
186-
<!-- END AUTOGENERATED TEXT -->
187-
<!-- endsemconv -->
188-
189102
### Metric: `system.cpu.physical.count`
190103

191104
This metric is [recommended][MetricRecommended].
@@ -230,30 +143,6 @@ This metric is [recommended][MetricRecommended].
230143
<!-- END AUTOGENERATED TEXT -->
231144
<!-- endsemconv -->
232145

233-
### Metric: `system.cpu.frequency`
234-
235-
This metric is [recommended][MetricRecommended].
236-
237-
<!-- semconv metric.system.cpu.frequency -->
238-
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
239-
<!-- see templates/registry/markdown/snippet.md.j2 -->
240-
<!-- prettier-ignore-start -->
241-
<!-- markdownlint-capture -->
242-
<!-- markdownlint-disable -->
243-
244-
| Name | Instrument Type | Unit (UCUM) | Description | Stability |
245-
| -------- | --------------- | ----------- | -------------- | --------- |
246-
| `system.cpu.frequency` | Gauge | `{Hz}` | Reports the current frequency of the CPU in Hz | ![Development](https://img.shields.io/badge/-development-blue) |
247-
248-
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
249-
|---|---|---|---|---|---|
250-
| [`system.cpu.logical_number`](/docs/attributes-registry/system.md) | int | The logical CPU number [0..n-1] | `1` | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) |
251-
252-
<!-- markdownlint-restore -->
253-
<!-- prettier-ignore-end -->
254-
<!-- END AUTOGENERATED TEXT -->
255-
<!-- endsemconv -->
256-
257146
## Memory Metrics
258147

259148
**Description:** System level memory metrics capture under the namespace `system.memory`.

‎internal/tools/go.mod

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
module github.com/open-telemetry/opentelemetry-specification/internal/tools
22

33
go 1.22.0
4+
45
toolchain go1.23.4
56

67
require (
78
github.com/client9/misspell v0.3.4
8-
go.opentelemetry.io/build-tools/chloggen v0.19.0
9+
go.opentelemetry.io/build-tools/chloggen v0.18.0
910
)
1011

1112
require (
1213
github.com/inconshreveable/mousetrap v1.1.0 // indirect
13-
github.com/spf13/cobra v1.9.1 // indirect
14-
github.com/spf13/pflag v1.0.6 // indirect
14+
github.com/spf13/cobra v1.8.1 // indirect
15+
github.com/spf13/pflag v1.0.5 // indirect
1516
gopkg.in/yaml.v3 v3.0.1 // indirect
1617
)

‎internal/tools/go.sum

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
github.com/client9/misspell v0.3.4 h1:ta993UF76GwbvJcIo3Y68y/M3WxlpEHPWIGDkJYwzJI=
22
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
3-
github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g=
3+
github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
44
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
55
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
66
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
77
github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
88
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
99
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
1010
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
11-
github.com/spf13/cobra v1.9.1 h1:CXSaggrXdbHK9CF+8ywj8Amf7PBRmPCOJugH954Nnlo=
12-
github.com/spf13/cobra v1.9.1/go.mod h1:nDyEzZ8ogv936Cinf6g1RU9MRY64Ir93oCnqb9wxYW0=
13-
github.com/spf13/pflag v1.0.6 h1:jFzHGLGAlb3ruxLB8MhbI6A8+AQX/2eW4qeyNZXNp2o=
14-
github.com/spf13/pflag v1.0.6/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
11+
github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM=
12+
github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y=
13+
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
14+
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
1515
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
1616
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
17-
go.opentelemetry.io/build-tools/chloggen v0.19.0 h1:B3yWuOFa4THsVEL/t4Jawy4LB2oZuaWD1+ANmBGBFyM=
18-
go.opentelemetry.io/build-tools/chloggen v0.19.0/go.mod h1:wJ8tJY5bURruxByT9gaaaGxjr1FoK8bUl/FiE+yQTfE=
17+
go.opentelemetry.io/build-tools/chloggen v0.18.0 h1:W9mHty4EJjbz742bFS0eT85aHLz85Mqpqd59tVqN3Ls=
18+
go.opentelemetry.io/build-tools/chloggen v0.18.0/go.mod h1:Wk92v9Wsv36sXYi7hOg3ndeeLKmKBu0/kgB7wcaeqJg=
1919
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
2020
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
2121
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=

‎model/code/registry-deprecated.yaml

+8
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ groups:
1515
- id: code.filepath
1616
type: string
1717
stability: development
18+
deprecated: Replaced by `code.file.path`
1819
brief: >
1920
Deprecated, use `code.file.path` instead
2021
examples: /usr/local/MyApplication/content_root/app/index.php
@@ -32,3 +33,10 @@ groups:
3233
brief: >
3334
Deprecated, use `code.column.number`
3435
examples: 16
36+
- id: code.namespace
37+
type: string
38+
stability: development
39+
deprecated: Value should be included in `code.function.name` which is expected to be a fully-qualified name.
40+
brief: >
41+
Deprecated, namespace is now included into `code.function.name`
42+
examples: com.example.MyHttpService

‎model/code/registry.yaml

+22-9
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,28 @@ groups:
99
type: string
1010
stability: development
1111
brief: >
12-
The method or function name, or equivalent (usually rightmost part of the code unit's name).
13-
examples: serveRequest
14-
- id: code.namespace
15-
type: string
16-
stability: development
17-
brief: >
18-
The "namespace" within which `code.function.name` is defined. Usually the qualified class or module name,
19-
such that `code.namespace` + some separator + `code.function.name` form a unique identifier for the code unit.
20-
examples: com.example.MyHttpService
12+
The method or function fully-qualified name without arguments. The value should fit the natural representation of the language
13+
runtime, which is also likely the same used within `code.stacktrace` attribute value.
14+
examples:
15+
- 'com.example.MyHttpService.serveRequest'
16+
- 'GuzzleHttp\Client::transfer'
17+
- 'fopen'
18+
note: |
19+
Values and format depends on each language runtime, thus it is impossible to provide an exhaustive list of examples.
20+
The values are usually the same (or prefixes of) the ones found in native stack trace representation stored in
21+
`code.stacktrace` without information on arguments.
22+
23+
Examples:
24+
25+
* Java method: `com.example.MyHttpService.serveRequest`
26+
* Java anonymous class method: `com.mycompany.Main$1.myMethod`
27+
* Java lambda method: `com.mycompany.Main$$Lambda/0x0000748ae4149c00.myMethod`
28+
* PHP function: `GuzzleHttp\Client::transfer
29+
* Go function: `github.com/my/repo/pkg.foo.func5`
30+
* Elixir: `OpenTelemetry.Ctx.new`
31+
* Erlang: `opentelemetry_ctx:new`
32+
* Rust: `playground::my_module::my_cool_func`
33+
* C function: `fopen`
2134
- id: code.file.path
2235
type: string
2336
stability: development

‎model/cpu/metrics.yaml

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
groups:
2+
# cpu.* metrics
3+
- id: metric.cpu.time
4+
type: metric
5+
metric_name: cpu.time
6+
stability: development
7+
brief: "Seconds each logical CPU spent on each mode"
8+
instrument: counter
9+
unit: "s"
10+
attributes:
11+
- ref: cpu.mode
12+
note: "Following states SHOULD be used: `user`, `system`, `nice`, `idle`, `iowait`, `interrupt`, `steal`"
13+
- ref: cpu.logical_number
14+
15+
- id: metric.cpu.utilization
16+
type: metric
17+
metric_name: cpu.utilization
18+
stability: development
19+
brief: "For each logical CPU, the utilization is calculated as the change in cumulative CPU time (cpu.time) over a measurement interval, divided by the elapsed time."
20+
instrument: gauge
21+
unit: "1"
22+
attributes:
23+
- ref: cpu.mode
24+
note: "Following modes SHOULD be used: `user`, `system`, `nice`, `idle`, `iowait`, `interrupt`, `steal`"
25+
- ref: cpu.logical_number
26+
27+
- id: metric.cpu.frequency
28+
type: metric
29+
metric_name: cpu.frequency
30+
stability: development
31+
brief: "Operating frequency of the logical CPU in Hertz."
32+
instrument: gauge
33+
unit: "Hz"
34+
attributes:
35+
- ref: cpu.logical_number

‎model/cpu/registry.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,8 @@ groups:
3535
stability: development
3636
stability: development
3737
examples: [ "user", "system" ]
38+
- id: cpu.logical_number
39+
type: int
40+
stability: development
41+
brief: "The logical CPU number [0..n-1]"
42+
examples: [1]

‎model/hardware/host-metrics.yaml

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
groups:
2+
# HOST METRICS
3+
- id: metric.hw.host.ambient_temperature
4+
type: metric
5+
metric_name: hw.host.ambient_temperature
6+
stability: development
7+
brief: "Ambient (external) temperature of the physical host"
8+
instrument: gauge
9+
unit: "Cel"
10+
extends: hardware.attributes.common
11+
12+
- id: metric.hw.host.energy
13+
type: metric
14+
metric_name: hw.host.energy
15+
stability: development
16+
brief: "Total energy consumed by the entire physical host, in joules"
17+
instrument: counter
18+
unit: "J"
19+
extends: hardware.attributes.common
20+
note: >
21+
The overall energy usage of a host MUST be reported using the specific `hw.host.energy` and `hw.host.power`
22+
metrics **only**, instead of the generic `hw.energy` and `hw.power` described in the previous section, to prevent
23+
summing up overlapping values.
24+
25+
- id: metric.hw.host.heating_margin
26+
type: metric
27+
metric_name: hw.host.heating_margin
28+
stability: experimental
29+
brief: >
30+
By how many degrees Celsius the temperature of the physical host can be increased, before reaching a warning
31+
threshold on one of the internal sensors
32+
instrument: gauge
33+
unit: "Cel"
34+
extends: hardware.attributes.common
35+
36+
- id: metric.hw.host.power
37+
type: metric
38+
metric_name: hw.host.power
39+
stability: experimental
40+
brief: >
41+
Instantaneous power consumed by the entire physical host in Watts (`hw.host.energy` is preferred)
42+
instrument: gauge
43+
unit: "W"
44+
extends: hardware.attributes.common
45+
note: >
46+
The overall energy usage of a host MUST be reported using the specific `hw.host.energy` and `hw.host.power`
47+
metrics **only**, instead of the generic `hw.energy` and `hw.power` described in the previous section, to prevent
48+
summing up overlapping values.

‎model/process/registry.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@ groups:
6464
type: string
6565
stability: development
6666
brief: >
67-
The name of the process executable. On Linux based systems, can be set
68-
to the `Name` in `proc/[pid]/status`. On Windows, can be set to the
69-
base name of `GetProcessImageFileNameW`.
67+
The name of the process executable. On Linux based systems, this SHOULD be
68+
set to the base name of the target of `/proc/[pid]/exe`. On Windows,
69+
this SHOULD be set to the base name of `GetProcessImageFileNameW`.
7070
examples: ['otelcol']
7171
- id: process.executable.path
7272
type: string
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
groups:
2+
- id: metric.system.cpu.time
3+
type: metric
4+
metric_name: system.cpu.time
5+
brief: "Deprecated. Use `cpu.time` instead."
6+
deprecated: "Replaced by `cpu.time`."
7+
stability: experimental
8+
instrument: counter
9+
unit: "s"
10+
11+
- id: metric.system.cpu.utilization
12+
type: metric
13+
metric_name: system.cpu.utilization
14+
brief: "Deprecated. Use `cpu.utilization` instead."
15+
deprecated: "Replaced by `cpu.utilization`."
16+
stability: experimental
17+
instrument: gauge
18+
unit: "1"
19+
20+
- id: metric.system.cpu.frequency
21+
type: metric
22+
metric_name: system.cpu.frequency
23+
brief: "Deprecated. Use `cpu.frequency` instead."
24+
deprecated: "Replaced by `cpu.frequency`."
25+
stability: experimental
26+
instrument: gauge
27+
unit: "{Hz}"

‎model/system/deprecated/registry-deprecated.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -94,3 +94,8 @@ groups:
9494
stability: development
9595
brief: "Deprecated, use `network.connection.state` instead."
9696
examples: [ "close_wait" ]
97+
- id: system.cpu.logical_number
98+
type: int
99+
stability: experimental
100+
brief: "Deprecated, use `cpu.logical_number` instead."
101+
examples: [1]

‎model/system/metrics.yaml

+8-44
Original file line numberDiff line numberDiff line change
@@ -12,42 +12,6 @@ groups:
1212
unit: "s"
1313

1414
# system.cpu.* metrics
15-
- id: metric.system.cpu.time
16-
type: metric
17-
metric_name: system.cpu.time
18-
stability: development
19-
brief: "Seconds each logical CPU spent on each mode"
20-
instrument: counter
21-
unit: "s"
22-
attributes:
23-
- ref: cpu.mode
24-
brief: "The CPU mode for this data point. A system's CPU SHOULD be characterized *either* by data points with no `mode` labels, *or only* data points with `mode` labels."
25-
note: "Following states SHOULD be used: `user`, `system`, `nice`, `idle`, `iowait`, `interrupt`, `steal`"
26-
- ref: system.cpu.logical_number
27-
28-
- id: metric.system.cpu.utilization
29-
type: metric
30-
metric_name: system.cpu.utilization
31-
stability: development
32-
brief: "Difference in system.cpu.time since the last measurement, divided by the elapsed time and number of logical CPUs"
33-
instrument: gauge
34-
unit: "1"
35-
attributes:
36-
- ref: cpu.mode
37-
brief: "The CPU mode for this data point. A system's CPU SHOULD be characterized *either* by data points with no `mode` labels, *or only* data points with `mode` labels."
38-
note: "Following modes SHOULD be used: `user`, `system`, `nice`, `idle`, `iowait`, `interrupt`, `steal`"
39-
- ref: system.cpu.logical_number
40-
41-
- id: metric.system.cpu.frequency
42-
type: metric
43-
metric_name: system.cpu.frequency
44-
stability: development
45-
brief: "Reports the current frequency of the CPU in Hz"
46-
instrument: gauge
47-
unit: "{Hz}"
48-
attributes:
49-
- ref: system.cpu.logical_number
50-
5115
- id: metric.system.cpu.physical.count
5216
type: metric
5317
metric_name: system.cpu.physical.count
@@ -193,12 +157,12 @@ groups:
193157
instrument: counter
194158
unit: "s"
195159
note: |
196-
The real elapsed time ("wall clock") used in the I/O path (time from operations running in parallel are not counted). Measured as:
160+
The real elapsed time ("wall clock") used in the I/O path (time from operations running in parallel are not counted). Measured as:
197161
198-
- Linux: Field 13 from [procfs-diskstats](https://www.kernel.org/doc/Documentation/ABI/testing/procfs-diskstats)
199-
- Windows: The complement of
200-
["Disk\% Idle Time"](https://learn.microsoft.com/archive/blogs/askcore/windows-performance-monitor-disk-counters-explained#windows-performance-monitor-disk-counters-explained)
201-
performance counter: `uptime * (100 - "Disk\% Idle Time") / 100`
162+
- Linux: Field 13 from [procfs-diskstats](https://www.kernel.org/doc/Documentation/ABI/testing/procfs-diskstats)
163+
- Windows: The complement of
164+
["Disk\% Idle Time"](https://learn.microsoft.com/archive/blogs/askcore/windows-performance-monitor-disk-counters-explained#windows-performance-monitor-disk-counters-explained)
165+
performance counter: `uptime * (100 - "Disk\% Idle Time") / 100`
202166
attributes:
203167
- ref: system.device
204168

@@ -210,10 +174,10 @@ groups:
210174
instrument: counter
211175
unit: "s"
212176
note: |
213-
Because it is the sum of time each request took, parallel-issued requests each contribute to make the count grow. Measured as:
177+
Because it is the sum of time each request took, parallel-issued requests each contribute to make the count grow. Measured as:
214178
215-
- Linux: Fields 7 & 11 from [procfs-diskstats](https://www.kernel.org/doc/Documentation/ABI/testing/procfs-diskstats)
216-
- Windows: "Avg. Disk sec/Read" perf counter multiplied by "Disk Reads/sec" perf counter (similar for Writes)
179+
- Linux: Fields 7 & 11 from [procfs-diskstats](https://www.kernel.org/doc/Documentation/ABI/testing/procfs-diskstats)
180+
- Windows: "Avg. Disk sec/Read" perf counter multiplied by "Disk Reads/sec" perf counter (similar for Writes)
217181
attributes:
218182
- ref: system.device
219183
- ref: disk.io.direction

‎model/system/registry.yaml

-11
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,6 @@ groups:
1010
stability: development
1111
brief: "The device identifier"
1212
examples: ["(identifier)"]
13-
# system.cpu.* attribute group
14-
- id: registry.system.cpu
15-
type: attribute_group
16-
display_name: System CPU Attributes
17-
brief: "Describes System CPU attributes"
18-
attributes:
19-
- id: system.cpu.logical_number
20-
type: int
21-
stability: development
22-
brief: "The logical CPU number [0..n-1]"
23-
examples: [1]
2413
# system.memory.* attribute group
2514
- id: registry.system.memory
2615
type: attribute_group

‎schema-next.yaml

+9
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,15 @@ versions:
1414
- rename_metrics:
1515
k8s.replication_controller.desired_pods: k8s.replicationcontroller.desired_pods
1616
k8s.replication_controller.available_pods: k8s.replicationcontroller.available_pods
17+
# https://github.com/open-telemetry/semantic-conventions/pull/1896
18+
- rename_metrics:
19+
system.cpu.time: cpu.time
20+
system.cpu.utilization: cpu.utilization
21+
system.cpu.frequency: cpu.frequency
22+
# https://github.com/open-telemetry/semantic-conventions/pull/1896
23+
- rename_attributes:
24+
attribute_map:
25+
system.cpu.logical_number: cpu.logical_number
1726
1.30.0:
1827
all:
1928
changes:

0 commit comments

Comments
 (0)
Please sign in to comment.