@opentelemetry/resource-detector-gcp 0.45.0 → 0.47.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.
- package/README.md +16 -15
- package/package.json +5 -5
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 `
|
|
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
|
|
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.
|
|
41
|
-
|
|
|
42
|
-
|
|
|
43
|
-
|
|
|
44
|
-
|
|
|
45
|
-
|
|
|
46
|
-
|
|
|
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.
|
|
3
|
+
"version": "0.47.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.
|
|
48
|
-
"@opentelemetry/instrumentation-http": "^0.
|
|
47
|
+
"@opentelemetry/contrib-test-utils": "^0.59.0",
|
|
48
|
+
"@opentelemetry/instrumentation-http": "^0.212.0",
|
|
49
49
|
"@opentelemetry/sdk-trace-base": "^2.0.0",
|
|
50
50
|
"bignumber.js": "9.3.1"
|
|
51
51
|
},
|
|
@@ -55,9 +55,9 @@
|
|
|
55
55
|
"dependencies": {
|
|
56
56
|
"@opentelemetry/core": "^2.0.0",
|
|
57
57
|
"@opentelemetry/resources": "^2.0.0",
|
|
58
|
-
"gcp-metadata": "^
|
|
58
|
+
"gcp-metadata": "^8.0.0"
|
|
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": "
|
|
62
|
+
"gitHead": "0b33a118f289c0435a241c84c3c3923312fc2b98"
|
|
63
63
|
}
|