Skip to content

Commit 3b3e665

Browse files
committed
chore: update readme for gcp resource detector
Update README of GCP Resource Detector to clarify the source of the data and add semantic conventions. Part Of #2055 Part Of #2025 Signed-off-by: maryliag <[email protected]>
1 parent fe18e2f commit 3b3e665

File tree

1 file changed

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

1 file changed

+18
-0
lines changed

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

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

30+
## Available detectors
31+
32+
This package uses `@opentelemetry/semantic-conventions` version `1.22+`, which implements Semantic Convention [Version 1.7.0](https://github.com/open-telemetry/opentelemetry-specification/blob/v1.7.0/semantic_conventions/README.md)
33+
34+
### GCP Detector
35+
36+
| Resource Attribute | Description |
37+
|-------------------------|---------------------------------------------------------------|
38+
| cloud.account.id | Value of `project-id` from GCP Metadata project |
39+
| cloud.availability_zone | Value of `zone` from GCP Metadata instance |
40+
| cloud.provider | The cloud provider. In this context, it's always "gcp" |
41+
| container.name | Value of Environment Variable `CONTAINER_NAME` |
42+
| host.id | Value of `id` from GCP Metadata instance |
43+
| host.name | Value of `hostname` from GCP Metadata instance |
44+
| k8s.cluster.name | Value of `attributes/cluster-name` from GCP Metadata instance |
45+
| k8s.namespace.name | Value of Environment Variable `NAMESPACE` |
46+
| k8s.pod.name | Value of Environment Variable `HOSTNAME` |
47+
3048
## Useful links
3149

3250
- [GCP Metadata Documentation][]

0 commit comments

Comments
 (0)