Skip to content

Commit

Permalink
chore: update readme for gcp resource detector
Browse files Browse the repository at this point in the history
Update README of GCP Resource Detector to clarify the source of the data.

Part Of #2055

Signed-off-by: maryliag <marylia.gutierrez@grafana.com>
  • Loading branch information
maryliag committed Mar 28, 2024
1 parent 85cbc8d commit 60fec59
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions detectors/node/opentelemetry-resource-detector-gcp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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][]
Expand Down

0 comments on commit 60fec59

Please sign in to comment.