Skip to content

Commit 60fec59

Browse files
committed
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 <[email protected]>
1 parent 85cbc8d commit 60fec59

File tree

1 file changed

+16
-0
lines changed
  • detectors/node/opentelemetry-resource-detector-gcp

1 file changed

+16
-0
lines changed

detectors/node/opentelemetry-resource-detector-gcp/README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,22 @@ const resource = await detectResources({
2727
const tracerProvider = new NodeTracerProvider({ resource });
2828
```
2929

30+
## Available detectors
31+
32+
### GCP Detector
33+
34+
| Resource Attribute | Description |
35+
|-------------------------|---------------------------------------------------------------|
36+
| cloud.account.id | Value of `project-id` from GCP Metadata project |
37+
| cloud.availability_zone | Value of `zone` from GCP Metadata instance |
38+
| cloud.provider | The cloud provider. In this context, it's always "gcp" |
39+
| container.name | Value of Environment Variable `CONTAINER_NAME` |
40+
| host.id | Value of `id` from GCP Metadata instance |
41+
| host.name | Value of `hostname` from GCP Metadata instance |
42+
| k8s.cluster.name | Value of `attributes/cluster-name` from GCP Metadata instance |
43+
| k8s.namespace.name | Value of Environment Variable `NAMESPACE` |
44+
| k8s.pod.name | Value of Environment Variable `HOSTNAME` |
45+
3046
## Useful links
3147

3248
- [GCP Metadata Documentation][]

0 commit comments

Comments
 (0)