Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@opencensus/resource-util

Package Overview
Dependencies
Maintainers
7
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opencensus/resource-util - npm Package Compare versions

Comparing version 0.0.19 to 0.0.20

17

build/src/resource-utils.js

@@ -113,7 +113,6 @@ "use strict";

if (Object.keys(gkeResourceLabels).length === 0) {
const [projectId, zoneId, clusterName, hostname] = yield Promise.all([
const [projectId, zoneId, clusterName] = yield Promise.all([
getProjectId(),
getZone(),
getClusterName(),
getHostname(),
]);

@@ -125,3 +124,4 @@ gkeResourceLabels[constants_1.CLOUD_RESOURCE.ACCOUNT_ID_KEY] = projectId;

process.env.NAMESPACE || '';
gkeResourceLabels[constants_1.K8S_RESOURCE.POD_NAME_KEY] = hostname;
gkeResourceLabels[constants_1.K8S_RESOURCE.POD_NAME_KEY] =
process.env.HOSTNAME || os.hostname();
gkeResourceLabels[constants_1.CONTAINER_RESOURCE.NAME_KEY] =

@@ -230,13 +230,2 @@ process.env.CONTAINER_NAME || '';

}
/** Gets hostname from GCP instance metadata. */
function getHostname() {
return __awaiter(this, void 0, void 0, function* () {
try {
return yield gcpMetadata.instance('hostname');
}
catch (ignore) {
return os.hostname();
}
});
}
function clear() {

@@ -243,0 +232,0 @@ resourceType = undefined;

6

package.json
{
"name": "@opencensus/resource-util",
"version": "0.0.19",
"version": "0.0.20",
"description": "The OpenCensus Monitored Resource Util for Node.js is a collection of utilities for auto detecting monitored resource when exporting stats, based on the environment where the application is running.",

@@ -55,3 +55,3 @@ "main": "build/src/index.js",

"@types/node": "^9.4.7",
"codecov": "^3.5.0",
"codecov": "^3.6.2",
"gts": "^1.0.0",

@@ -66,5 +66,5 @@ "mocha": "^6.1.0",

"dependencies": {
"@opencensus/core": "^0.0.19",
"@opencensus/core": "^0.0.20",
"gcp-metadata": "^3.0.0"
}
}
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