From a2c57d637a0d2a39bfebcde8ff70ce14cc82836a Mon Sep 17 00:00:00 2001 From: Mike Dame Date: Fri, 12 May 2023 17:31:03 +0000 Subject: [PATCH] Add GCP Compute Engine resource attributes for host/instance --- CHANGELOG.md | 2 ++ .../resource/cloud_provider/gcp/gce.yaml | 22 +++++++++++++++++++ .../cloud_provider/gcp/gce.md | 12 ++++++++++ 3 files changed, 36 insertions(+) create mode 100644 semantic_conventions/resource/cloud_provider/gcp/gce.yaml create mode 100644 specification/resource/semantic_conventions/cloud_provider/gcp/gce.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 6cb28f42e1..81154a006a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -64,3 +64,5 @@ release. ([#3458](https://github.com/open-telemetry/opentelemetry-specification/pull/3458)) - Specify the value range for JVM CPU metrics. ([#13](https://github.com/open-telemetry/semantic-conventions/pull/13)) +- Add `gcp.gce.instance.name` and `gcp.gce.instance.hostname` resource + attributes for GCP Compute Engine VMs. ([#15](https://github.com/open-telemetry/semantic-conventions/pull/15)) diff --git a/semantic_conventions/resource/cloud_provider/gcp/gce.yaml b/semantic_conventions/resource/cloud_provider/gcp/gce.yaml new file mode 100644 index 0000000000..879d0ea388 --- /dev/null +++ b/semantic_conventions/resource/cloud_provider/gcp/gce.yaml @@ -0,0 +1,22 @@ +groups: + - id: gcp.gce + prefix: gcp.gce + type: resource + brief: > + Resources used by Google Compute Engine (GCE). + attributes: + - id: instance.name + type: string + brief: > + The instance name of a GCE instance. This is the value + provided by `host.name`, the visible name of the instance in + the Cloud Console UI, and the prefix for the default + hostname of the instance as defined by the [default internal + DNS + name](https://cloud.google.com/compute/docs/internal-dns#instance-fully-qualified-domain-names). + examples: ['instance-1', 'my-vm-name'] + - id: instance.hostname + type: string + brief: > + The hostname of a GCE instance. This is the full value of the default or [custom hostname](https://cloud.google.com/compute/docs/instances/custom-hostname-vm). + examples: ['my-host1234.example.com', 'sample-vm.us-west1-b.c.my-project.internal'] diff --git a/specification/resource/semantic_conventions/cloud_provider/gcp/gce.md b/specification/resource/semantic_conventions/cloud_provider/gcp/gce.md new file mode 100644 index 0000000000..49d9954643 --- /dev/null +++ b/specification/resource/semantic_conventions/cloud_provider/gcp/gce.md @@ -0,0 +1,12 @@ +# Google Compute Engine + +**Type:** `gcp.gce` + +**Description:** Resource attributes for GCE instances. + + +| Attribute | Type | Description | Examples | Requirement Level | +|---|---|---|---|---| +| `gcp.gce.instance.name` | string | The instance name of a GCE instance. This is the value provided by `host.name`, the visible name of the instance in the Cloud Console UI, and the prefix for the default hostname of the instance as defined by the [default internal DNS name](https://cloud.google.com/compute/docs/internal-dns#instance-fully-qualified-domain-names). | `instance-1`; `my-vm-name` | Recommended | +| `gcp.gce.instance.hostname` | string | The hostname of a GCE instance. This is the full value of the default or [custom hostname](https://cloud.google.com/compute/docs/instances/custom-hostname-vm). | `my-host1234.example.com`; `sample-vm.us-west1-b.c.my-project.internal` | Recommended | +