Socket
Socket
Sign inDemoInstall

@opentelemetry/resource-detector-gcp

Package Overview
Dependencies
Maintainers
2
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.27.5 to 0.28.0

2

build/src/detectors/GcpDetector.d.ts

@@ -27,2 +27,4 @@ import { Detector, ResourceDetectionConfig, Resource } from '@opentelemetry/resources';

private _getClusterName;
/** Gets hostname from GCP instance metadata. */
private _getHostname;
}

@@ -29,0 +31,0 @@ export declare const gcpDetector: GcpDetector;

@@ -45,3 +45,3 @@ "use strict";

}
const [projectId, instanceId, zoneId, clusterName] = await Promise.all([
const [projectId, instanceId, zoneId, clusterName, hostname] = await Promise.all([
this._getProjectId(),

@@ -51,2 +51,3 @@ this._getInstanceId(),

this._getClusterName(),
this._getHostname(),
]);

@@ -56,2 +57,3 @@ const attributes = {};

attributes[semantic_conventions_1.SemanticResourceAttributes.HOST_ID] = instanceId;
attributes[semantic_conventions_1.SemanticResourceAttributes.HOST_NAME] = hostname;
attributes[semantic_conventions_1.SemanticResourceAttributes.CLOUD_AVAILABILITY_ZONE] = zoneId;

@@ -113,4 +115,13 @@ attributes[semantic_conventions_1.SemanticResourceAttributes.CLOUD_PROVIDER] =

}
/** Gets hostname from GCP instance metadata. */
async _getHostname() {
try {
return await gcpMetadata.instance('hostname');
}
catch (_a) {
return '';
}
}
}
exports.gcpDetector = new GcpDetector();
//# sourceMappingURL=GcpDetector.js.map

4

package.json
{
"name": "@opentelemetry/resource-detector-gcp",
"version": "0.27.5",
"version": "0.28.0",
"description": "OpenTelemetry SDK resource detector for GCP",

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

"homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/detectors/node/opentelemetry-resource-detector-gcp#readme",
"gitHead": "63e0fc9b6b862f74304abf0343c506a5bd415191"
"gitHead": "e3dfedccec7f249dcc637bf76db16e8d412538aa"
}

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