From 60fec5962aee5d997fe0ea426a017f0ece5b129d Mon Sep 17 00:00:00 2001 From: maryliag Date: Thu, 28 Mar 2024 12:06:48 -0400 Subject: [PATCH] chore: update readme for gcp resource detector Update README of GCP Resource Detector to clarify the source of the data. Part Of #2055 Signed-off-by: maryliag --- .../README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/detectors/node/opentelemetry-resource-detector-gcp/README.md b/detectors/node/opentelemetry-resource-detector-gcp/README.md index 5262d02c33..efe9168562 100644 --- a/detectors/node/opentelemetry-resource-detector-gcp/README.md +++ b/detectors/node/opentelemetry-resource-detector-gcp/README.md @@ -27,6 +27,22 @@ const resource = await detectResources({ const tracerProvider = new NodeTracerProvider({ resource }); ``` +## Available detectors + +### GCP Detector + +| Resource Attribute | Description | +|-------------------------|---------------------------------------------------------------| +| cloud.account.id | Value of `project-id` from GCP Metadata project | +| cloud.availability_zone | Value of `zone` from GCP Metadata instance | +| cloud.provider | The cloud provider. In this context, it's always "gcp" | +| container.name | Value of Environment Variable `CONTAINER_NAME` | +| host.id | Value of `id` from GCP Metadata instance | +| host.name | Value of `hostname` from GCP Metadata instance | +| k8s.cluster.name | Value of `attributes/cluster-name` from GCP Metadata instance | +| k8s.namespace.name | Value of Environment Variable `NAMESPACE` | +| k8s.pod.name | Value of Environment Variable `HOSTNAME` | + ## Useful links - [GCP Metadata Documentation][]