From 786262c70788855d8bfe7fc21991a34695a29010 Mon Sep 17 00:00:00 2001 From: Pablo Baeyens Date: Fri, 22 Sep 2023 14:18:29 +0200 Subject: [PATCH 1/4] [resource/host] Define host.mac semantic convention --- CHANGELOG.md | 2 ++ docs/resource/host.md | 3 +++ model/resource/host.yaml | 9 +++++++++ 3 files changed, 14 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 39fcf53427..515acdcf0b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -108,6 +108,8 @@ release. - BREAKING: Rename `http.server.request.size` metric to `http.server.request.body.size` and `http.server.response.size` metric to `http.server.response.body.size` ([#247](https://github.com/open-telemetry/semantic-conventions/pull/247)) +- Add `host.mac` resource attribute convention. + ([#340](https://github.com/open-telemetry/semantic-conventions/pull/340)) ## v1.21.0 (2023-07-13) diff --git a/docs/resource/host.md b/docs/resource/host.md index 150755dc19..202ec44faf 100644 --- a/docs/resource/host.md +++ b/docs/resource/host.md @@ -16,6 +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.mac` | string[] | Available MAC addresses of the host, excluding loopback interfaces. [1] | `[ac-de-48-23-45-67, AC-DE-48-23-45-67-01-9F]` | Opt-In | + +**[1]:** 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 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. diff --git a/model/resource/host.yaml b/model/resource/host.yaml index 2839d8f660..acc102fde4 100644 --- a/model/resource/host.yaml +++ b/model/resource/host.yaml @@ -70,6 +70,15 @@ groups: The version string of the VM image or host OS as defined in [Version Attributes](README.md#version-attributes). examples: ['0.1'] + - 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 hexadecimal form from most to least significant. + examples: ['ac-de-48-23-45-67', 'AC-DE-48-23-45-67-01-9F'] - id: host.cpu prefix: host.cpu type: resource From 76da20fe6dadb5506d520c4365310e2949f0dfd7 Mon Sep 17 00:00:00 2001 From: Pablo Baeyens Date: Wed, 27 Sep 2023 16:02:08 +0200 Subject: [PATCH 2/4] Further restrict format to uppercase hexadecimal form --- docs/resource/host.md | 4 ++-- model/resource/host.yaml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/resource/host.md b/docs/resource/host.md index 202ec44faf..a5aa6278a1 100644 --- a/docs/resource/host.md +++ b/docs/resource/host.md @@ -16,9 +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.mac` | string[] | Available MAC addresses of the host, excluding loopback interfaces. [1] | `[ac-de-48-23-45-67, AC-DE-48-23-45-67-01-9F]` | Opt-In | +| `host.mac` | string[] | Available MAC addresses of the host, excluding loopback interfaces. [1] | `[AC-DE-48-23-45-67, AC-DE-48-23-45-67-01-9F]` | Opt-In | -**[1]:** 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 hexadecimal form from most to least significant. +**[1]:** 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. diff --git a/model/resource/host.yaml b/model/resource/host.yaml index acc102fde4..dbc7f1cbc3 100644 --- a/model/resource/host.yaml +++ b/model/resource/host.yaml @@ -77,8 +77,8 @@ groups: 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 hexadecimal form from most to least significant. - examples: ['ac-de-48-23-45-67', 'AC-DE-48-23-45-67-01-9F'] + 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: host.cpu prefix: host.cpu type: resource From 7cde07bb9eb6dadce6a95199d17f4470b4972ba4 Mon Sep 17 00:00:00 2001 From: Pablo Baeyens Date: Wed, 25 Oct 2023 11:56:05 +0200 Subject: [PATCH 3/4] Fix lint CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3e2d9d7f93..b4794f16f5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,7 @@ release. ([#384](https://github.com/open-telemetry/semantic-conventions/pull/384)) ### Features + - Adds `session.previous_id` to session.md ([#348](https://github.com/open-telemetry/semantic-conventions/pull/348)) - Metric namespaces SHOULD NOT be pluralized. From 8aa1668a86ad190c46a87f2da07c85ec14d378f7 Mon Sep 17 00:00:00 2001 From: Alexander Wert Date: Mon, 30 Oct 2023 12:05:23 +0100 Subject: [PATCH 4/4] Update CHANGELOG.md --- CHANGELOG.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f49e71ef60..4df2894b5f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -48,7 +48,6 @@ release. - Add `host.mac` resource attribute convention. ([#340](https://github.com/open-telemetry/semantic-conventions/pull/340)) - ### Fixes - Clarify that `error.type` should be the fully-qualified exception class name