From 7aa19ac34b52ff425b5c94a38ed131c51af0d247 Mon Sep 17 00:00:00 2001 From: Pablo Baeyens Date: Mon, 24 Jul 2023 15:17:03 +0200 Subject: [PATCH 1/5] [resource/host] Add semantic conventions for IP addresses of a host --- docs/resource/host.md | 6 ++++++ model/resource/host.yaml | 16 ++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/docs/resource/host.md b/docs/resource/host.md index 96d7da4dea..ccfef66f28 100644 --- a/docs/resource/host.md +++ b/docs/resource/host.md @@ -16,6 +16,12 @@ | `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.id` | string | VM image ID or host OS image ID. For Cloud, this value is from the provider. | `ami-07b06b442921831e5` | 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.ipv4.addresses` | string[] | Available IPv4 addresses of the host, excluding loopback interfaces. [1] | `[['192.168.1.140']]` | Opt-In | +| `host.ipv6.addresses` | string[] | Available IPv6 addresses of the host, excluding loopback interfaces. [2] | `[['fe80::abc2:4a28:737a:609e', 'fe80::849e:eaff:fe31:3c90']]` | Opt-In | + +**[1]:** Addresses MUST be specified in dotted-quad notation. + +**[2]:** Addresses MUST be specified in the [RFC 5952](https://www.rfc-editor.org/rfc/rfc5952.html) format. `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. diff --git a/model/resource/host.yaml b/model/resource/host.yaml index 457aa1c8ae..490fc47e80 100644 --- a/model/resource/host.yaml +++ b/model/resource/host.yaml @@ -70,3 +70,19 @@ groups: The version string of the VM image or host OS as defined in [Version Attributes](README.md#version-attributes). examples: ['0.1'] + - id: ipv4.addresses + type: string[] + requirement_level: opt_in + brief: > + Available IPv4 addresses of the host, excluding loopback interfaces. + note: > + Addresses MUST be specified in dotted-quad notation. + examples: [["192.168.1.140"]] + - id: ipv6.addresses + type: string[] + requirement_level: opt_in + brief: > + Available IPv6 addresses of the host, excluding loopback interfaces. + note: > + Addresses MUST be specified in the [RFC 5952](https://www.rfc-editor.org/rfc/rfc5952.html) format. + examples: [["fe80::abc2:4a28:737a:609e", "fe80::849e:eaff:fe31:3c90"]] From e087ff5a9399c6eb2744a85eb415ec1ed50c84ca Mon Sep 17 00:00:00 2001 From: Pablo Baeyens Date: Mon, 24 Jul 2023 16:22:34 +0200 Subject: [PATCH 2/5] Fix YAML formatting --- docs/resource/host.md | 4 ++-- model/resource/host.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/resource/host.md b/docs/resource/host.md index ccfef66f28..3773931577 100644 --- a/docs/resource/host.md +++ b/docs/resource/host.md @@ -16,8 +16,8 @@ | `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.id` | string | VM image ID or host OS image ID. For Cloud, this value is from the provider. | `ami-07b06b442921831e5` | 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.ipv4.addresses` | string[] | Available IPv4 addresses of the host, excluding loopback interfaces. [1] | `[['192.168.1.140']]` | Opt-In | -| `host.ipv6.addresses` | string[] | Available IPv6 addresses of the host, excluding loopback interfaces. [2] | `[['fe80::abc2:4a28:737a:609e', 'fe80::849e:eaff:fe31:3c90']]` | Opt-In | +| `host.ipv4.addresses` | string[] | Available IPv4 addresses of the host, excluding loopback interfaces. [1] | `[192.168.1.140]` | Opt-In | +| `host.ipv6.addresses` | string[] | Available IPv6 addresses of the host, excluding loopback interfaces. [2] | `[fe80::abc2:4a28:737a:609e, fe80::849e:eaff:fe31:3c90]` | Opt-In | **[1]:** Addresses MUST be specified in dotted-quad notation. diff --git a/model/resource/host.yaml b/model/resource/host.yaml index 490fc47e80..ceb44ca3fc 100644 --- a/model/resource/host.yaml +++ b/model/resource/host.yaml @@ -77,12 +77,12 @@ groups: Available IPv4 addresses of the host, excluding loopback interfaces. note: > Addresses MUST be specified in dotted-quad notation. - examples: [["192.168.1.140"]] + examples: ["192.168.1.140"] - id: ipv6.addresses type: string[] requirement_level: opt_in brief: > Available IPv6 addresses of the host, excluding loopback interfaces. - note: > + note: > Addresses MUST be specified in the [RFC 5952](https://www.rfc-editor.org/rfc/rfc5952.html) format. - examples: [["fe80::abc2:4a28:737a:609e", "fe80::849e:eaff:fe31:3c90"]] + examples: ["fe80::abc2:4a28:737a:609e", "fe80::849e:eaff:fe31:3c90"] From 5cff2f5461d6c04736b0e1f6076a1aca111eaf56 Mon Sep 17 00:00:00 2001 From: Pablo Baeyens Date: Mon, 31 Jul 2023 10:11:08 +0200 Subject: [PATCH 3/5] Unify into single `host.ip` attribute --- docs/resource/host.md | 7 ++----- model/resource/host.yaml | 17 +++++------------ 2 files changed, 7 insertions(+), 17 deletions(-) diff --git a/docs/resource/host.md b/docs/resource/host.md index 3773931577..8303f21440 100644 --- a/docs/resource/host.md +++ b/docs/resource/host.md @@ -16,12 +16,9 @@ | `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.id` | string | VM image ID or host OS image ID. For Cloud, this value is from the provider. | `ami-07b06b442921831e5` | 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.ipv4.addresses` | string[] | Available IPv4 addresses of the host, excluding loopback interfaces. [1] | `[192.168.1.140]` | Opt-In | -| `host.ipv6.addresses` | string[] | Available IPv6 addresses of the host, excluding loopback interfaces. [2] | `[fe80::abc2:4a28:737a:609e, fe80::849e:eaff:fe31:3c90]` | Opt-In | +| `host.ip` | string[] | Available IP addresses of the host, excluding loopback interfaces. [1] | `[192.168.1.140, fe80::abc2:4a28:737a:609e]` | Opt-In | -**[1]:** Addresses MUST be specified in dotted-quad notation. - -**[2]:** Addresses MUST be specified in the [RFC 5952](https://www.rfc-editor.org/rfc/rfc5952.html) format. +**[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. `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. diff --git a/model/resource/host.yaml b/model/resource/host.yaml index ceb44ca3fc..097076b540 100644 --- a/model/resource/host.yaml +++ b/model/resource/host.yaml @@ -70,19 +70,12 @@ groups: The version string of the VM image or host OS as defined in [Version Attributes](README.md#version-attributes). examples: ['0.1'] - - id: ipv4.addresses + - id: ip type: string[] requirement_level: opt_in brief: > - Available IPv4 addresses of the host, excluding loopback interfaces. + Available IP addresses of the host, excluding loopback interfaces. note: > - Addresses MUST be specified in dotted-quad notation. - examples: ["192.168.1.140"] - - id: ipv6.addresses - type: string[] - requirement_level: opt_in - brief: > - Available IPv6 addresses of the host, excluding loopback interfaces. - note: > - Addresses MUST be specified in the [RFC 5952](https://www.rfc-editor.org/rfc/rfc5952.html) format. - examples: ["fe80::abc2:4a28:737a:609e", "fe80::849e:eaff:fe31:3c90"] + 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"] From 2a9d277f72b2b5856dd646997871a93db08b9979 Mon Sep 17 00:00:00 2001 From: Pablo Baeyens Date: Thu, 21 Sep 2023 17:48:37 +0200 Subject: [PATCH 4/5] Fix indentation and move to 'host' section --- model/resource/host.yaml | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/model/resource/host.yaml b/model/resource/host.yaml index 93300556e4..141ccd76bf 100644 --- a/model/resource/host.yaml +++ b/model/resource/host.yaml @@ -70,6 +70,16 @@ groups: 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: host.cpu prefix: host.cpu type: resource @@ -116,12 +126,3 @@ groups: brief: > The amount of level 2 memory cache available to the processor (in Bytes). examples: [ 12288000 ] - - 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"] From a3aea1670a5f5ceae94ff55c425c7049005317e3 Mon Sep 17 00:00:00 2001 From: Pablo Baeyens Date: Fri, 22 Sep 2023 14:22:10 +0200 Subject: [PATCH 5/5] Add changelog entry --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4d6974e789..d7d863e992 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -103,6 +103,8 @@ release. - BREAKING: Rename `messaging.message.payload_size_bytes` to `messaging.message.body.size`, remove `messaging.message.payload_compressed_size_bytes`. ([#229](https://github.com/open-telemetry/semantic-conventions/pull/229)) +- Add `host.ip` resource attribute convention. + ([#203](https://github.com/open-telemetry/semantic-conventions/pull/203)) ## v1.21.0 (2023-07-13)