New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@opentelemetry/instrumentation

Package Overview
Dependencies
Maintainers
4
Versions
135
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opentelemetry/instrumentation - npm Package Compare versions

Comparing version

to
0.18.3-alpha.33

1

build/src/platform/node/instrumentation.d.ts

@@ -11,3 +11,2 @@ import * as types from '../../types';

constructor(instrumentationName: string, instrumentationVersion: string, config?: types.InstrumentationConfig);
private _isSupported;
private _onRequire;

@@ -14,0 +13,0 @@ enable(): void;

24

build/src/platform/node/instrumentation.js

@@ -45,15 +45,2 @@ "use strict";

}
_isSupported(name, version) {
for (const module of this._modules) {
if (module.name === name) {
if (!module.supportedVersions) {
return true;
}
return module.supportedVersions.some(supportedVersion => {
return semver.satisfies(version, supportedVersion);
});
}
}
return false;
}
_onRequire(module, exports, name, baseDir) {

@@ -72,3 +59,4 @@ var _a;

// main module
if (typeof version === 'string' && this._isSupported(name, version)) {
if (typeof version === 'string' &&
isSupported(module.supportedVersions, version)) {
if (typeof module.patch === 'function') {

@@ -86,4 +74,3 @@ module.moduleExports = exports;

const file = files.find(file => file.name === name);
if (file &&
file.supportedVersions.some(supportedVersion => semver.satisfies(version, supportedVersion))) {
if (file && isSupported(file.supportedVersions, version)) {
file.moduleExports = exports;

@@ -140,2 +127,7 @@ if (this._enabled) {

exports.InstrumentationBase = InstrumentationBase;
function isSupported(supportedVersions, version) {
return supportedVersions.some(supportedVersion => {
return semver.satisfies(version, supportedVersion);
});
}
//# sourceMappingURL=instrumentation.js.map
{
"name": "@opentelemetry/instrumentation",
"version": "0.18.3-alpha.25+4ef22cae",
"version": "0.18.3-alpha.33+c516264e",
"description": "Base class for node which OpenTelemetry instrumentation modules extend",

@@ -57,3 +57,3 @@ "author": "OpenTelemetry Authors",

"dependencies": {
"@opentelemetry/api-metrics": "^0.18.3-alpha.25+4ef22cae",
"@opentelemetry/api-metrics": "^0.18.2",
"require-in-the-middle": "^5.0.3",

@@ -98,3 +98,3 @@ "semver": "^7.3.2",

},
"gitHead": "4ef22cae74b9c976f969151ebcc3ae3d931cf9c6"
"gitHead": "c516264ed0c01b714770c5d2a8ca78fd793625d9"
}

Sorry, the diff of this file is not supported yet