Skip to content

Commit b7ccdbd

Browse files
authored
docs(resource-detector-gcp): update README.md to reflect current state (open-telemetry#3343)
1 parent d14f8e5 commit b7ccdbd

File tree

1 file changed

+16
-15
lines changed

1 file changed

+16
-15
lines changed

packages/resource-detector-gcp/README.md

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,10 @@
55

66
Resource detector for Google Cloud Platform.
77

8-
Compatible with OpenTelemetry JS API and SDK `1.0+`.
8+
Compatible with OpenTelemetry JS API `1.0+` and SDK `2.0+`.
99

1010
## Installation
1111

12-
The GCP resource detector requires Node.JS 10+ due to a dependency on [`gcp-metadata`][] which uses features only available in Node.JS 10+.
1312

1413
```bash
1514
npm install --save @opentelemetry/resource-detector-gcp
@@ -29,21 +28,24 @@ const tracerProvider = new NodeTracerProvider({ resource });
2928

3029
## Available detectors
3130

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)
31+
This package implements Semantic Convention [Version 1.39.0](https://github.com/open-telemetry/semantic-conventions/blob/v1.39.0/docs/README.md)
3332

3433
### GCP Detector
3534

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` |
35+
| Resource Attribute | Description |
36+
|-------------------------|-----------------------------------------------------------------------|
37+
| cloud.account.id | Value of `project-id` from GCP Metadata project. |
38+
| cloud.availability_zone | Value of `zone` from GCP Metadata instance (parsed from full path). |
39+
| cloud.platform | The GCP platform where the application is running. |
40+
| cloud.provider | The cloud provider. In this context, it's always `gcp` |
41+
| cloud.region | Value of `region` from GCP Metadata instance (parsed from full path). |
42+
| faas.instance | Value of `id` from GCP Metadata instance. |
43+
| faas.name | Value of Environment Variable `K_SERVICE`. |
44+
| faas.version | Value of Environment Variable `K_REVISION`. |
45+
| host.id | Value of `id` from GCP Metadata instance. |
46+
| host.name | Value of `name` from GCP Metadata instance. |
47+
| host.type | Value of `machine-type` from GCP Metadata instance. |
48+
| k8s.cluster.name | Value of `attributes/cluster-name` from GCP Metadata instance. |
4749

4850
## Useful links
4951

@@ -56,7 +58,6 @@ This package uses `@opentelemetry/semantic-conventions` version `1.22+`, which i
5658

5759
Apache 2.0 - See [LICENSE][license-url] for more information.
5860

59-
[`gcp-metadata`]: https://www.npmjs.com/package/gcp-metadata
6061
[GCP Metadata Documentation]: https://cloud.google.com/compute/docs/metadata/overview
6162
[discussions-url]: https://github.com/open-telemetry/opentelemetry-js/discussions
6263
[license-url]: https://github.com/open-telemetry/opentelemetry-js-contrib/blob/main/LICENSE

0 commit comments

Comments
 (0)