Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(resource-detector-gcp): update readme for gcp resource detector #2062

Merged
merged 3 commits into from
Apr 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 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,24 @@ const resource = await detectResources({
const tracerProvider = new NodeTracerProvider({ resource });
```

## Available detectors

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)

### 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
Loading