@opentelemetry/resource-detector-gcp 0.45.0 → 0.46.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +16 -15
  2. package/package.json +4 -4
package/README.md CHANGED
@@ -5,11 +5,10 @@
5
5
 
6
6
  Resource detector for Google Cloud Platform.
7
7
 
8
- Compatible with OpenTelemetry JS API and SDK `1.0+`.
8
+ Compatible with OpenTelemetry JS API `1.0+` and SDK `2.0+`.
9
9
 
10
10
  ## Installation
11
11
 
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+.
13
12
 
14
13
  ```bash
15
14
  npm install --save @opentelemetry/resource-detector-gcp
@@ -29,21 +28,24 @@ const tracerProvider = new NodeTracerProvider({ resource });
29
28
 
30
29
  ## Available detectors
31
30
 
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)
33
32
 
34
33
  ### GCP Detector
35
34
 
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. |
47
49
 
48
50
  ## Useful links
49
51
 
@@ -56,7 +58,6 @@ This package uses `@opentelemetry/semantic-conventions` version `1.22+`, which i
56
58
 
57
59
  Apache 2.0 - See [LICENSE][license-url] for more information.
58
60
 
59
- [`gcp-metadata`]: https://www.npmjs.com/package/gcp-metadata
60
61
  [GCP Metadata Documentation]: https://cloud.google.com/compute/docs/metadata/overview
61
62
  [discussions-url]: https://github.com/open-telemetry/opentelemetry-js/discussions
62
63
  [license-url]: https://github.com/open-telemetry/opentelemetry-js-contrib/blob/main/LICENSE
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opentelemetry/resource-detector-gcp",
3
- "version": "0.45.0",
3
+ "version": "0.46.0",
4
4
  "description": "OpenTelemetry SDK resource detector for GCP",
5
5
  "main": "build/src/index.js",
6
6
  "module": "build/esm/index.js",
@@ -44,8 +44,8 @@
44
44
  },
45
45
  "devDependencies": {
46
46
  "@opentelemetry/api": "^1.0.0",
47
- "@opentelemetry/contrib-test-utils": "^0.57.0",
48
- "@opentelemetry/instrumentation-http": "^0.210.0",
47
+ "@opentelemetry/contrib-test-utils": "^0.58.0",
48
+ "@opentelemetry/instrumentation-http": "^0.211.0",
49
49
  "@opentelemetry/sdk-trace-base": "^2.0.0",
50
50
  "bignumber.js": "9.3.1"
51
51
  },
@@ -59,5 +59,5 @@
59
59
  },
60
60
  "homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/packages/resource-detector-gcp#readme",
61
61
  "sideEffects": false,
62
- "gitHead": "c84212cca7f010b80747cccb9942474e0459df6e"
62
+ "gitHead": "7a5f3c0a09b6a2d32c712b2962b95137c906a016"
63
63
  }