Socket
Socket
Sign inDemoInstall

@opentelemetry/resource-detector-gcp

Package Overview
Dependencies
Maintainers
4
Versions
132
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opentelemetry/resource-detector-gcp - npm Package Compare versions

Comparing version 0.19.1-alpha.39 to 0.19.1-alpha.43

18

build/src/detectors/GcpDetector.js

@@ -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.39+23ba4bfd",
"version": "0.19.1-alpha.43+d5517812",
"description": "OpenTelemetry SDK resource detector for GCP",

@@ -42,9 +42,8 @@ "main": "build/src/index.js",

"devDependencies": {
"@opentelemetry/api": "^1.0.0-rc.0",
"@opentelemetry/core": "^0.19.1-alpha.39+23ba4bfd",
"@opentelemetry/api": "^0.20.0",
"@opentelemetry/core": "^0.19.1-alpha.43+d5517812",
"@types/mocha": "8.2.2",
"@types/node": "14.14.41",
"@types/semver": "7.3.4",
"@types/node": "14.14.43",
"@types/semver": "7.3.5",
"codecov": "3.8.1",
"gts": "3.1.0",
"mocha": "7.2.0",

@@ -56,13 +55,14 @@ "nock": "12.0.3",

"ts-node": "9.1.1",
"typescript": "4.2.4"
"typescript": "4.3.2"
},
"peerDependencies": {
"@opentelemetry/api": "^1.0.0-rc.0"
"@opentelemetry/api": "^0.20.0"
},
"dependencies": {
"@opentelemetry/resources": "^0.19.1-alpha.39+23ba4bfd",
"@opentelemetry/resources": "^0.19.1-alpha.43+d5517812",
"@opentelemetry/semantic-conventions": "^0.19.1-alpha.43+d5517812",
"gcp-metadata": "^4.1.4",
"semver": "7.3.5"
},
"gitHead": "23ba4bfdc77c8bf594bf0c817320a31f59ca0bd4"
"gitHead": "d5517812b31d9206131bf1df4f8a3b5183ab07fb"
}

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc