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 host to the registry #498

Merged
merged 12 commits into from
Nov 13, 2023
1 change: 1 addition & 0 deletions docs/attributes-registry/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Currently, the following namespaces exist:
* [Cloud](cloud.md)
* [Code](code.md)
* [Container](container.md)
* [Host](host.md)
* [HTTP](http.md)
* [Network](network.md)
* [OCI](oci.md)
Expand Down
44 changes: 44 additions & 0 deletions docs/attributes-registry/host.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<!--- Hugo front matter used to generate the website version of this page:
--->
# Host

## Host Attributes

<!-- semconv registry.host(omit_requirement_level) -->
| Attribute | Type | Description | Examples |
|---|---|---|---|
| `host.arch` | string | The CPU architecture the host system is running on. | `amd64` |
| `host.cache.l2.size` | int | The amount of level 2 memory cache available to the processor (in Bytes). | `12288000` |
| `host.family` | int | Numeric value specifying the family or generation of the CPU. | `6` |
| `host.id` | string | Unique host ID. For Cloud, this must be the instance_id assigned by the cloud provider. For non-containerized systems, this should be the `machine-id`. See the table below for the sources to use to determine the `machine-id` based on operating system. | `fdbf79e8af94cb7f9e8df36789187052` |
| `host.image.id` | string | VM image ID or host OS image ID. For Cloud, this value is from the provider. | `ami-07b06b442921831e5` |
| `host.image.name` | string | Name of the VM image or OS install the host was instantiated from. | `infra-ami-eks-worker-node-7d4ec78312`; `CentOS-8-x86_64-1905` |
| `host.image.version` | string | The version string of the VM image or host OS as defined in [Version Attributes](../resource/README.md#version-attributes). | `0.1` |
| `host.ip` | string[] | Available IP addresses of the host, excluding loopback interfaces. [1] | `[192.168.1.140, fe80::abc2:4a28:737a:609e]` |
| `host.mac` | string[] | Available MAC addresses of the host, excluding loopback interfaces. [2] | `[AC-DE-48-23-45-67, AC-DE-48-23-45-67-01-9F]` |
| `host.model.id` | int | Model identifier. It provides more granular information about the CPU, distinguishing it from other CPUs within the same family. | `6` |
| `host.model.name` | string | Model designation of the processor. | `11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz` |
| `host.name` | string | Name of the host. On Unix systems, it may contain what the hostname command returns, or the fully qualified hostname, or another name specified by the user. | `opentelemetry-test` |
| `host.stepping` | int | Stepping or core revisions. | `1` |
| `host.type` | string | Type of host. For Cloud, this must be the machine type. | `n1-standard-1` |
| `host.vendor.id` | string | Processor manufacturer identifier. A maximum 12-character string. [3] | `GenuineIntel` |

**[1]:** IPv4 Addresses MUST be specified in dotted-quad notation. IPv6 addresses MUST be specified in the [RFC 5952](https://www.rfc-editor.org/rfc/rfc5952.html) format.

**[2]:** MAC Addresses MUST be represented in [IEEE RA hexadecimal form](https://standards.ieee.org/wp-content/uploads/import/documents/tutorials/eui.pdf): as hyphen-separated octets in uppercase hexadecimal form from most to least significant.

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

`host.arch` 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 |
|---|---|
| `amd64` | AMD64 |
| `arm32` | ARM32 |
| `arm64` | ARM64 |
| `ia64` | Itanium |
| `ppc32` | 32-bit PowerPC |
| `ppc64` | 64-bit PowerPC |
| `s390x` | IBM z/Architecture |
| `x86` | 32-bit x86 |
<!-- endsemconv -->
42 changes: 14 additions & 28 deletions docs/resource/host.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,45 +12,31 @@ To report host metrics, the `system.*` namespace SHOULD be used.
<!-- semconv host -->
| Attribute | Type | Description | Examples | Requirement Level |
|---|---|---|---|---|
| `host.arch` | string | The CPU architecture the host system is running on. | `amd64` | Recommended |
| `host.id` | string | Unique host ID. For Cloud, this must be the instance_id assigned by the cloud provider. For non-containerized systems, this should be the `machine-id`. See the table below for the sources to use to determine the `machine-id` based on operating system. | `fdbf79e8af94cb7f9e8df36789187052` | Recommended |
| `host.image.id` | string | VM image ID or host OS image ID. For Cloud, this value is from the provider. | `ami-07b06b442921831e5` | Recommended |
| `host.image.name` | string | Name of the VM image or OS install the host was instantiated from. | `infra-ami-eks-worker-node-7d4ec78312`; `CentOS-8-x86_64-1905` | Recommended |
| `host.image.version` | string | The version string of the VM image or host OS as defined in [Version Attributes](README.md#version-attributes). | `0.1` | Recommended |
| `host.ip` | string[] | Available IP addresses of the host, excluding loopback interfaces. [1] | `[192.168.1.140, fe80::abc2:4a28:737a:609e]` | Opt-In |
| `host.mac` | string[] | Available MAC addresses of the host, excluding loopback interfaces. [2] | `[AC-DE-48-23-45-67, AC-DE-48-23-45-67-01-9F]` | Opt-In |
| `host.name` | string | Name of the host. On Unix systems, it may contain what the hostname command returns, or the fully qualified hostname, or another name specified by the user. | `opentelemetry-test` | Recommended |
| `host.type` | string | Type of host. For Cloud, this must be the machine type. | `n1-standard-1` | Recommended |
| [`host.arch`](../attributes-registry/host.md) | string | The CPU architecture the host system is running on. | `amd64` | Recommended |
| [`host.id`](../attributes-registry/host.md) | string | Unique host ID. For Cloud, this must be the instance_id assigned by the cloud provider. For non-containerized systems, this should be the `machine-id`. See the table below for the sources to use to determine the `machine-id` based on operating system. | `fdbf79e8af94cb7f9e8df36789187052` | Recommended |
| [`host.image.id`](../attributes-registry/host.md) | string | VM image ID or host OS image ID. For Cloud, this value is from the provider. | `ami-07b06b442921831e5` | Recommended |
| [`host.image.name`](../attributes-registry/host.md) | string | Name of the VM image or OS install the host was instantiated from. | `infra-ami-eks-worker-node-7d4ec78312`; `CentOS-8-x86_64-1905` | Recommended |
| [`host.image.version`](../attributes-registry/host.md) | string | The version string of the VM image or host OS as defined in [Version Attributes](../resource/README.md#version-attributes). | `0.1` | Recommended |
AlexanderWert marked this conversation as resolved.
Show resolved Hide resolved
| [`host.ip`](../attributes-registry/host.md) | string[] | Available IP addresses of the host, excluding loopback interfaces. [1] | `[192.168.1.140, fe80::abc2:4a28:737a:609e]` | Recommended |
| [`host.mac`](../attributes-registry/host.md) | string[] | Available MAC addresses of the host, excluding loopback interfaces. [2] | `[AC-DE-48-23-45-67, AC-DE-48-23-45-67-01-9F]` | Recommended |
trisch-me marked this conversation as resolved.
Show resolved Hide resolved
| [`host.type`](../attributes-registry/host.md) | string | Type of host. For Cloud, this must be the machine type. | `n1-standard-1` | Recommended |

**[1]:** IPv4 Addresses MUST be specified in dotted-quad notation. IPv6 addresses MUST be specified in the [RFC 5952](https://www.rfc-editor.org/rfc/rfc5952.html) format.

**[2]:** MAC Addresses MUST be represented in [IEEE RA hexadecimal form](https://standards.ieee.org/wp-content/uploads/import/documents/tutorials/eui.pdf): as hyphen-separated octets in uppercase hexadecimal form from most to least significant.

`host.arch` 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.
trisch-me marked this conversation as resolved.
Show resolved Hide resolved

| Value | Description |
|---|---|
| `amd64` | AMD64 |
| `arm32` | ARM32 |
| `arm64` | ARM64 |
| `ia64` | Itanium |
| `ppc32` | 32-bit PowerPC |
| `ppc64` | 64-bit PowerPC |
| `s390x` | IBM z/Architecture |
| `x86` | 32-bit x86 |
<!-- endsemconv -->

**type:** `host.cpu`

<!-- semconv host.cpu -->
| Attribute | Type | Description | Examples | Requirement Level |
|---|---|---|---|---|
| `host.cpu.cache.l2.size` | int | The amount of level 2 memory cache available to the processor (in Bytes). | `12288000` | 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.vendor.id` | string | Processor manufacturer identifier. A maximum 12-character string. [1] | `GenuineIntel` | Opt-In |
| [`host.cache.l2.size`](../attributes-registry/host.md) | int | The amount of level 2 memory cache available to the processor (in Bytes). | `12288000` | Opt-In |
AlexanderWert marked this conversation as resolved.
Show resolved Hide resolved
| [`host.family`](../attributes-registry/host.md) | int | Numeric value specifying the family or generation of the CPU. | `6` | Opt-In |
| [`host.model.id`](../attributes-registry/host.md) | int | Model identifier. It provides more granular information about the CPU, distinguishing it from other CPUs within the same family. | `6` | Opt-In |
| [`host.model.name`](../attributes-registry/host.md) | string | Model designation of the processor. | `11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz` | Opt-In |
| [`host.stepping`](../attributes-registry/host.md) | int | Stepping or core revisions. | `1` | Opt-In |
| [`host.vendor.id`](../attributes-registry/host.md) | string | Processor manufacturer identifier. A maximum 12-character string. [1] | `GenuineIntel` | 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.
<!-- endsemconv -->
Expand Down
122 changes: 122 additions & 0 deletions model/registry/host.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
groups:
- id: registry.host
prefix: host
type: attribute_group
brief: >
A host is defined as a computing instance. For example, physical servers, virtual machines, switches or disk array.
attributes:
- id: id
type: string
brief: >
Unique host ID. For Cloud, this must be the instance_id assigned by the cloud provider.
For non-containerized systems, this should be the `machine-id`. See the table below for
the sources to use to determine the `machine-id` based on operating system.
examples: ['fdbf79e8af94cb7f9e8df36789187052']
- id: name
type: string
brief: >
Name of the host. On Unix systems, it may contain what the hostname
command returns, or the fully qualified hostname, or another name
specified by the user.
examples: ['opentelemetry-test']
- id: type
type: string
brief: >
Type of host. For Cloud, this must be the machine type.
examples: ['n1-standard-1']
- id: arch
type:
allow_custom_values: true
members:
- id: amd64
value: 'amd64'
brief: "AMD64"
- id: arm32
value: 'arm32'
brief: "ARM32"
- id: arm64
value: 'arm64'
brief: "ARM64"
- id: ia64
value: 'ia64'
brief: "Itanium"
- id: ppc32
value: 'ppc32'
brief: "32-bit PowerPC"
- id: ppc64
value: 'ppc64'
brief: "64-bit PowerPC"
- id: s390x
value: 's390x'
brief: "IBM z/Architecture"
- id: x86
value: 'x86'
brief: "32-bit x86"
brief: >
The CPU architecture the host system is running on.
- id: image.name
type: string
brief: >
Name of the VM image or OS install the host was instantiated from.
examples: ['infra-ami-eks-worker-node-7d4ec78312', 'CentOS-8-x86_64-1905']
- id: image.id
type: string
brief: >
VM image ID or host OS image ID. For Cloud, this value is from the provider.
examples: ['ami-07b06b442921831e5']
- id: image.version
type: string
brief: >
The version string of the VM image or host OS as defined in
[Version Attributes](../resource/README.md#version-attributes).
AlexanderWert marked this conversation as resolved.
Show resolved Hide resolved
examples: ['0.1']
- id: ip
type: string[]
brief: >
Available IP addresses of the host, excluding loopback interfaces.
note: >
IPv4 Addresses MUST be specified in dotted-quad notation. IPv6 addresses
MUST be specified in the [RFC 5952](https://www.rfc-editor.org/rfc/rfc5952.html) format.
examples: ["192.168.1.140", "fe80::abc2:4a28:737a:609e"]
- id: mac
type: string[]
brief: >
Available MAC addresses of the host, excluding loopback interfaces.
note: >
MAC Addresses MUST be represented in [IEEE RA hexadecimal form](https://standards.ieee.org/wp-content/uploads/import/documents/tutorials/eui.pdf):
as hyphen-separated octets in uppercase hexadecimal form from most to least significant.
examples: ['AC-DE-48-23-45-67', 'AC-DE-48-23-45-67-01-9F']
- id: vendor.id
trisch-me marked this conversation as resolved.
Show resolved Hide resolved
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
trisch-me marked this conversation as resolved.
Show resolved Hide resolved
type: int
brief: >
Numeric value specifying the family or generation of the CPU.
examples: [ 6 ]
- id: model.id
trisch-me marked this conversation as resolved.
Show resolved Hide resolved
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
trisch-me marked this conversation as resolved.
Show resolved Hide resolved
type: string
brief: >
Model designation of the processor.
examples: [ '11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz' ]
- id: stepping
trisch-me marked this conversation as resolved.
Show resolved Hide resolved
type: int
brief: >
Stepping or core revisions.
examples: [ 1 ]
- id: cache.l2.size
trisch-me marked this conversation as resolved.
Show resolved Hide resolved
type: int
brief: >
The amount of level 2 memory cache available to the processor (in Bytes).
examples: [ 12288000 ]
131 changes: 14 additions & 117 deletions model/resource/host.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,133 +5,30 @@ groups:
brief: >
A host is defined as a computing instance. For example, physical servers, virtual machines, switches or disk array.
attributes:
- id: id
type: string
brief: >
Unique host ID. For Cloud, this must be the instance_id assigned by the cloud provider.
For non-containerized systems, this should be the `machine-id`. See the table below for
the sources to use to determine the `machine-id` based on operating system.
examples: ['fdbf79e8af94cb7f9e8df36789187052']
- id: name
type: string
brief: >
Name of the host. On Unix systems, it may contain what the hostname
command returns, or the fully qualified hostname, or another name
specified by the user.
examples: ['opentelemetry-test']
- id: type
type: string
brief: >
Type of host. For Cloud, this must be the machine type.
examples: ['n1-standard-1']
- id: arch
type:
allow_custom_values: true
members:
- id: amd64
value: 'amd64'
brief: "AMD64"
- id: arm32
value: 'arm32'
brief: "ARM32"
- id: arm64
value: 'arm64'
brief: "ARM64"
- id: ia64
value: 'ia64'
brief: "Itanium"
- id: ppc32
value: 'ppc32'
brief: "32-bit PowerPC"
- id: ppc64
value: 'ppc64'
brief: "64-bit PowerPC"
- id: s390x
value: 's390x'
brief: "IBM z/Architecture"
- id: x86
value: 'x86'
brief: "32-bit x86"
brief: >
The CPU architecture the host system is running on.
- id: image.name
type: string
brief: >
Name of the VM image or OS install the host was instantiated from.
examples: ['infra-ami-eks-worker-node-7d4ec78312', 'CentOS-8-x86_64-1905']
- id: image.id
type: string
brief: >
VM image ID or host OS image ID. For Cloud, this value is from the provider.
examples: ['ami-07b06b442921831e5']
- id: image.version
type: string
brief: >
The version string of the VM image or host OS as defined in
[Version Attributes](README.md#version-attributes).
examples: ['0.1']
- id: ip
type: string[]
requirement_level: opt_in
brief: >
Available IP addresses of the host, excluding loopback interfaces.
note: >
IPv4 Addresses MUST be specified in dotted-quad notation. IPv6 addresses
MUST be specified in the [RFC 5952](https://www.rfc-editor.org/rfc/rfc5952.html) format.
examples: ["192.168.1.140", "fe80::abc2:4a28:737a:609e"]
- id: mac
type: string[]
requirement_level: opt_in
brief: >
Available MAC addresses of the host, excluding loopback interfaces.
note: >
MAC Addresses MUST be represented in [IEEE RA hexadecimal form](https://standards.ieee.org/wp-content/uploads/import/documents/tutorials/eui.pdf):
as hyphen-separated octets in uppercase hexadecimal form from most to least significant.
examples: ['AC-DE-48-23-45-67', 'AC-DE-48-23-45-67-01-9F']
- ref: host.id
trisch-me marked this conversation as resolved.
Show resolved Hide resolved
- ref: host.type
- ref: host.arch
- ref: host.image.name
- ref: host.image.id
- ref: host.image.version
- ref: host.ip
trisch-me marked this conversation as resolved.
Show resolved Hide resolved
- ref: host.mac
trisch-me marked this conversation as resolved.
Show resolved Hide resolved

- id: host.cpu
prefix: host.cpu
type: resource
brief: >
A host's CPU information
attributes:
- id: vendor.id
- ref: host.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
- ref: host.family
requirement_level: opt_in
type: int
brief: >
Numeric value specifying the family or generation of the CPU.
examples: [ 6 ]
- id: model.id
- ref: host.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
- ref: host.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
- ref: host.stepping
requirement_level: opt_in
type: int
brief: >
Stepping or core revisions.
examples: [ 1 ]
- id: cache.l2.size
- ref: host.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 ]
Loading