diff --git a/CHANGELOG.md b/CHANGELOG.md index 6faafa19c4..ed0bba815c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -59,6 +59,8 @@ release. ([#252](https://github.com/open-telemetry/semantic-conventions/pull/252)) - Simplify HTTP metric briefs. ([#276](https://github.com/open-telemetry/semantic-conventions/pull/276)) +- Add host cpu resource attributes. + ([#209](https://github.com/open-telemetry/semantic-conventions/pull/209)) ## v1.21.0 (2023-07-13) diff --git a/docs/resource/host.md b/docs/resource/host.md index 96d7da4dea..150755dc19 100644 --- a/docs/resource/host.md +++ b/docs/resource/host.md @@ -31,6 +31,21 @@ | `x86` | 32-bit x86 | +**type:** `host.cpu` + + +| Attribute | Type | Description | Examples | Requirement Level | +|---|---|---|---|---| +| `host.cpu.vendor.id` | string | Processor manufacturer identifier. A maximum 12-character string. [1] | `GenuineIntel` | Opt-In | +| `host.cpu.family` | int | Numeric value specifying the family or generation of the CPU. | `6` | Opt-In | +| `host.cpu.model.id` | int | Model identifier. It provides more granular information about the CPU, distinguishing it from other CPUs within the same family. | `6` | Opt-In | +| `host.cpu.model.name` | string | Model designation of the processor. | `11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz` | Opt-In | +| `host.cpu.stepping` | int | Stepping or core revisions. | `1` | Opt-In | +| `host.cpu.cache.l2.size` | int | The amount of level 2 memory cache available to the processor (in Bytes). | `12288000` | Opt-In | + +**[1]:** [CPUID](https://wiki.osdev.org/CPUID) command returns the vendor ID string in EBX, EDX and ECX registers. Writing these to memory in this order results in a 12-character string. + + ## Collecting host.id from non-containerized systems ### Non-privileged Machine ID Lookup diff --git a/model/resource/host.yaml b/model/resource/host.yaml index 457aa1c8ae..2839d8f660 100644 --- a/model/resource/host.yaml +++ b/model/resource/host.yaml @@ -70,3 +70,49 @@ groups: The version string of the VM image or host OS as defined in [Version Attributes](README.md#version-attributes). examples: ['0.1'] + - id: host.cpu + prefix: host.cpu + type: resource + brief: > + A host's CPU information + attributes: + - id: vendor.id + requirement_level: opt_in + type: string + brief: > + Processor manufacturer identifier. A maximum 12-character string. + note: > + [CPUID](https://wiki.osdev.org/CPUID) command returns the vendor ID string in EBX, EDX and ECX registers. + Writing these to memory in this order results in a 12-character string. + examples: [ 'GenuineIntel' ] + - id: family + requirement_level: opt_in + type: int + brief: > + Numeric value specifying the family or generation of the CPU. + examples: [ 6 ] + - id: model.id + requirement_level: opt_in + type: int + brief: > + Model identifier. It provides more granular information about the CPU, distinguishing it from + other CPUs within the same family. + examples: [ 6 ] + - id: model.name + requirement_level: opt_in + type: string + brief: > + Model designation of the processor. + examples: [ '11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz' ] + - id: stepping + requirement_level: opt_in + type: int + brief: > + Stepping or core revisions. + examples: [ 1 ] + - id: cache.l2.size + requirement_level: opt_in + type: int + brief: > + The amount of level 2 memory cache available to the processor (in Bytes). + examples: [ 12288000 ]