@opentelemetry/resource-detector-gcp
Advanced tools
Comparing version 0.19.1-alpha.12 to 0.19.1-alpha.19
@@ -24,2 +24,3 @@ "use strict"; | ||
const core_1 = require("@opentelemetry/core"); | ||
const semantic_conventions_1 = require("@opentelemetry/semantic-conventions"); | ||
/** | ||
@@ -52,6 +53,7 @@ * The GcpDetector can be used to detect if a process is running in the Google | ||
const attributes = {}; | ||
attributes[resources_1.CLOUD_RESOURCE.ACCOUNT_ID] = projectId; | ||
attributes[resources_1.HOST_RESOURCE.ID] = instanceId; | ||
attributes[resources_1.CLOUD_RESOURCE.ZONE] = zoneId; | ||
attributes[resources_1.CLOUD_RESOURCE.PROVIDER] = 'gcp'; | ||
attributes[semantic_conventions_1.ResourceAttributes.CLOUD_ACCOUNT_ID] = projectId; | ||
attributes[semantic_conventions_1.ResourceAttributes.HOST_ID] = instanceId; | ||
attributes[semantic_conventions_1.ResourceAttributes.CLOUD_AVAILABILITY_ZONE] = zoneId; | ||
attributes[semantic_conventions_1.ResourceAttributes.CLOUD_PROVIDER] = | ||
semantic_conventions_1.CloudProviderValues.GCP; | ||
if (core_1.getEnv().KUBERNETES_SERVICE_HOST) | ||
@@ -64,6 +66,6 @@ this._addK8sAttributes(attributes, clusterName); | ||
const env = core_1.getEnv(); | ||
attributes[resources_1.K8S_RESOURCE.CLUSTER_NAME] = clusterName; | ||
attributes[resources_1.K8S_RESOURCE.NAMESPACE_NAME] = env.NAMESPACE; | ||
attributes[resources_1.K8S_RESOURCE.POD_NAME] = env.HOSTNAME; | ||
attributes[resources_1.CONTAINER_RESOURCE.NAME] = env.CONTAINER_NAME; | ||
attributes[semantic_conventions_1.ResourceAttributes.K8S_CLUSTER_NAME] = clusterName; | ||
attributes[semantic_conventions_1.ResourceAttributes.K8S_NAMESPACE_NAME] = env.NAMESPACE; | ||
attributes[semantic_conventions_1.ResourceAttributes.K8S_POD_NAME] = env.HOSTNAME; | ||
attributes[semantic_conventions_1.ResourceAttributes.CONTAINER_NAME] = env.CONTAINER_NAME; | ||
} | ||
@@ -70,0 +72,0 @@ /** Gets project id from GCP project metadata. */ |
{ | ||
"name": "@opentelemetry/resource-detector-gcp", | ||
"version": "0.19.1-alpha.12+25c205aa", | ||
"version": "0.19.1-alpha.19+9ce9eea7", | ||
"description": "OpenTelemetry SDK resource detector for GCP", | ||
@@ -43,3 +43,3 @@ "main": "build/src/index.js", | ||
"@opentelemetry/api": "^1.0.0-rc.0", | ||
"@opentelemetry/core": "^0.19.1-alpha.12+25c205aa", | ||
"@opentelemetry/core": "^0.19.1-alpha.19+9ce9eea7", | ||
"@types/mocha": "8.2.2", | ||
@@ -62,7 +62,8 @@ "@types/node": "14.14.43", | ||
"dependencies": { | ||
"@opentelemetry/resources": "^0.19.1-alpha.12+25c205aa", | ||
"@opentelemetry/resources": "^0.19.1-alpha.19+9ce9eea7", | ||
"@opentelemetry/semantic-conventions": "^0.19.0", | ||
"gcp-metadata": "^4.1.4", | ||
"semver": "7.3.5" | ||
}, | ||
"gitHead": "25c205aaffb6707d4275be6bade3e078e50e2df3" | ||
"gitHead": "9ce9eea7cad32cbc57bd80830f21e4f366ecf929" | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
28355
224
5