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

@opentelemetry/resource-detector-alibaba-cloud

Package Overview
Dependencies
Maintainers
3
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opentelemetry/resource-detector-alibaba-cloud - npm Package Compare versions

Comparing version 0.28.10 to 0.29.0

8

build/src/detectors/AlibabaCloudEcsDetector.d.ts

@@ -1,2 +0,2 @@

import { Detector, Resource, ResourceDetectionConfig } from '@opentelemetry/resources';
import { DetectorSync, IResource, ResourceAttributes, ResourceDetectionConfig } from '@opentelemetry/resources';
/**

@@ -7,3 +7,3 @@ * The AlibabaCloudEcsDetector can be used to detect if a process is running in

*/
declare class AlibabaCloudEcsDetector implements Detector {
declare class AlibabaCloudEcsDetector implements DetectorSync {
/**

@@ -24,3 +24,5 @@ * See https://www.alibabacloud.com/help/doc-detail/67254.htm for

*/
detect(_config?: ResourceDetectionConfig): Promise<Resource>;
detect(_config?: ResourceDetectionConfig): IResource;
/** Gets identity and host info and returns them as attribs. Empty object if fails */
_getAttributes(_config?: ResourceDetectionConfig): Promise<ResourceAttributes>;
/**

@@ -27,0 +29,0 @@ * Fetch AlibabaCloud instance document url with http requests. If the

@@ -45,6 +45,10 @@ "use strict";

*/
async detect(_config) {
detect(_config) {
return new resources_1.Resource({}, this._getAttributes());
}
/** Gets identity and host info and returns them as attribs. Empty object if fails */
async _getAttributes(_config) {
const { 'owner-account-id': accountId, 'instance-id': instanceId, 'instance-type': instanceType, 'region-id': region, 'zone-id': availabilityZone, } = await this._fetchIdentity();
const hostname = await this._fetchHost();
return new resources_1.Resource({
return {
[semantic_conventions_1.SEMRESATTRS_CLOUD_PROVIDER]: semantic_conventions_1.CLOUDPROVIDERVALUES_ALIBABA_CLOUD,

@@ -58,3 +62,3 @@ [semantic_conventions_1.SEMRESATTRS_CLOUD_PLATFORM]: semantic_conventions_1.CLOUDPLATFORMVALUES_ALIBABA_CLOUD_ECS,

[semantic_conventions_1.SEMRESATTRS_HOST_NAME]: hostname,
});
};
}

@@ -61,0 +65,0 @@ /**

@@ -1,2 +0,2 @@

export * from './AlibabaCloudEcsDetector';
export { alibabaCloudEcsDetector } from './AlibabaCloudEcsDetector';
//# sourceMappingURL=index.d.ts.map

@@ -17,14 +17,6 @@ "use strict";

*/
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./AlibabaCloudEcsDetector"), exports);
exports.alibabaCloudEcsDetector = void 0;
var AlibabaCloudEcsDetector_1 = require("./AlibabaCloudEcsDetector");
Object.defineProperty(exports, "alibabaCloudEcsDetector", { enumerable: true, get: function () { return AlibabaCloudEcsDetector_1.alibabaCloudEcsDetector; } });
//# sourceMappingURL=index.js.map

@@ -1,2 +0,2 @@

export * from './detectors';
export { alibabaCloudEcsDetector } from './detectors';
//# sourceMappingURL=index.d.ts.map

@@ -17,14 +17,6 @@ "use strict";

*/
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./detectors"), exports);
exports.alibabaCloudEcsDetector = void 0;
var detectors_1 = require("./detectors");
Object.defineProperty(exports, "alibabaCloudEcsDetector", { enumerable: true, get: function () { return detectors_1.alibabaCloudEcsDetector; } });
//# sourceMappingURL=index.js.map
{
"name": "@opentelemetry/resource-detector-alibaba-cloud",
"version": "0.28.10",
"version": "0.29.0",
"description": "OpenTelemetry resource detector for Alibaba Cloud",

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

"homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/detectors/node/opentelemetry-resource-detector-alibaba-cloud#readme",
"gitHead": "0af1b70f7c3c9763c85ac51fa5e334c1e1512020"
"gitHead": "0e96b2acdb553b17db7fcae0638443c38b04e968"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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