@opentelemetry/instrumentation
Advanced tools
Comparing version 0.26.0 to 0.27.0
@@ -25,2 +25,3 @@ /* | ||
for (var i = 0, j = options.length; i < j; i++) { | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
var option = options[i]; | ||
@@ -55,3 +56,9 @@ if (Array.isArray(option)) { | ||
} | ||
instrumentation.enable(); | ||
// instrumentations have been already enabled during creation | ||
// so enable only if user prevented that by setting enabled to false | ||
// this is to prevent double enabling but when calling register all | ||
// instrumentations should be now enabled | ||
if (!instrumentation.getConfig().enabled) { | ||
instrumentation.enable(); | ||
} | ||
} | ||
@@ -58,0 +65,0 @@ } |
@@ -96,3 +96,3 @@ /* | ||
var files = (_a = module.files) !== null && _a !== void 0 ? _a : []; | ||
var file = files.find(function (file) { return file.name === name; }); | ||
var file = files.find(function (f) { return f.name === name; }); | ||
if (file && isSupported(file.supportedVersions, version, module.includePrerelease)) { | ||
@@ -99,0 +99,0 @@ file.moduleExports = exports; |
@@ -51,3 +51,3 @@ import { TracerProvider } from '@opentelemetry/api'; | ||
*/ | ||
export interface ShimWrapped { | ||
export interface ShimWrapped extends Function { | ||
__wrapped: boolean; | ||
@@ -54,0 +54,0 @@ __unwrap: Function; |
@@ -0,1 +1,2 @@ | ||
import { ShimWrapped } from './types'; | ||
/** | ||
@@ -17,3 +18,3 @@ * function to execute patched function and being able to catch errors | ||
*/ | ||
export declare function isWrapped(func: any): boolean; | ||
export declare function isWrapped(func: unknown): func is ShimWrapped; | ||
//# sourceMappingURL=utils.d.ts.map |
@@ -1,2 +0,2 @@ | ||
export declare const VERSION = "0.26.0"; | ||
export declare const VERSION = "0.27.0"; | ||
//# sourceMappingURL=version.d.ts.map |
@@ -17,3 +17,3 @@ /* | ||
// this is autogenerated file, see scripts/version-update.js | ||
export var VERSION = '0.26.0'; | ||
export var VERSION = '0.27.0'; | ||
//# sourceMappingURL=version.js.map |
@@ -27,2 +27,3 @@ "use strict"; | ||
for (let i = 0, j = options.length; i < j; i++) { | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
const option = options[i]; | ||
@@ -58,3 +59,9 @@ if (Array.isArray(option)) { | ||
} | ||
instrumentation.enable(); | ||
// instrumentations have been already enabled during creation | ||
// so enable only if user prevented that by setting enabled to false | ||
// this is to prevent double enabling but when calling register all | ||
// instrumentations should be now enabled | ||
if (!instrumentation.getConfig().enabled) { | ||
instrumentation.enable(); | ||
} | ||
} | ||
@@ -61,0 +68,0 @@ } |
@@ -81,3 +81,3 @@ "use strict"; | ||
const files = (_a = module.files) !== null && _a !== void 0 ? _a : []; | ||
const file = files.find(file => file.name === name); | ||
const file = files.find(f => f.name === name); | ||
if (file && isSupported(file.supportedVersions, version, module.includePrerelease)) { | ||
@@ -84,0 +84,0 @@ file.moduleExports = exports; |
@@ -51,3 +51,3 @@ import { TracerProvider } from '@opentelemetry/api'; | ||
*/ | ||
export interface ShimWrapped { | ||
export interface ShimWrapped extends Function { | ||
__wrapped: boolean; | ||
@@ -54,0 +54,0 @@ __unwrap: Function; |
@@ -0,1 +1,2 @@ | ||
import { ShimWrapped } from './types'; | ||
/** | ||
@@ -17,3 +18,3 @@ * function to execute patched function and being able to catch errors | ||
*/ | ||
export declare function isWrapped(func: any): boolean; | ||
export declare function isWrapped(func: unknown): func is ShimWrapped; | ||
//# sourceMappingURL=utils.d.ts.map |
@@ -1,2 +0,2 @@ | ||
export declare const VERSION = "0.26.0"; | ||
export declare const VERSION = "0.27.0"; | ||
//# sourceMappingURL=version.d.ts.map |
@@ -20,3 +20,3 @@ "use strict"; | ||
// this is autogenerated file, see scripts/version-update.js | ||
exports.VERSION = '0.26.0'; | ||
exports.VERSION = '0.27.0'; | ||
//# sourceMappingURL=version.js.map |
{ | ||
"name": "@opentelemetry/instrumentation", | ||
"version": "0.26.0", | ||
"version": "0.27.0", | ||
"description": "Base class for node which OpenTelemetry instrumentation modules extend", | ||
@@ -64,3 +64,3 @@ "author": "OpenTelemetry Authors", | ||
"dependencies": { | ||
"@opentelemetry/api-metrics": "0.26.0", | ||
"@opentelemetry/api-metrics": "0.27.0", | ||
"require-in-the-middle": "^5.0.3", | ||
@@ -71,7 +71,7 @@ "semver": "^7.3.2", | ||
"peerDependencies": { | ||
"@opentelemetry/api": "^1.0.2" | ||
"@opentelemetry/api": "^1.0.0" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "7.15.0", | ||
"@opentelemetry/api": "^1.0.2", | ||
"@opentelemetry/api": "^1.0.3", | ||
"@types/mocha": "8.2.3", | ||
@@ -87,3 +87,3 @@ "@types/node": "14.17.11", | ||
"istanbul-instrumenter-loader": "3.0.1", | ||
"karma": "5.2.3", | ||
"karma": "6.3.7", | ||
"karma-chrome-launcher": "3.1.0", | ||
@@ -97,3 +97,3 @@ "karma-coverage-istanbul-reporter": "3.0.3", | ||
"rimraf": "3.0.2", | ||
"sinon": "11.1.2", | ||
"sinon": "12.0.1", | ||
"ts-loader": "8.3.0", | ||
@@ -106,3 +106,3 @@ "ts-mocha": "8.0.0", | ||
}, | ||
"gitHead": "0f5a5bc906a2166c30a4344e460b7206c0b20bac" | ||
"gitHead": "f5e227f0cb829df1ca2dc220a3e0e8ae0e607405" | ||
} |
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
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
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
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
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
187236
1901
+ Added@opentelemetry/api-metrics@0.27.0(transitive)
- Removed@opentelemetry/api-metrics@0.26.0(transitive)