@opentelemetry/instrumentation
Advanced tools
Comparing version 0.27.0 to 0.28.0
@@ -31,2 +31,13 @@ /* | ||
})(); | ||
var __values = (this && this.__values) || function(o) { | ||
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; | ||
if (m) return m.call(o); | ||
if (o && typeof o.length === "number") return { | ||
next: function () { | ||
if (o && i >= o.length) o = void 0; | ||
return { value: o && o[i++], done: !o }; | ||
} | ||
}; | ||
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); | ||
}; | ||
import * as path from 'path'; | ||
@@ -108,2 +119,3 @@ import * as RequireInTheMiddle from 'require-in-the-middle'; | ||
InstrumentationBase.prototype.enable = function () { | ||
var e_1, _a, e_2, _b, e_3, _c; | ||
var _this = this; | ||
@@ -116,14 +128,32 @@ if (this._enabled) { | ||
if (this._hooks.length > 0) { | ||
for (var _i = 0, _a = this._modules; _i < _a.length; _i++) { | ||
var module_1 = _a[_i]; | ||
if (typeof module_1.patch === 'function' && module_1.moduleExports) { | ||
module_1.patch(module_1.moduleExports, module_1.moduleVersion); | ||
} | ||
for (var _b = 0, _c = module_1.files; _b < _c.length; _b++) { | ||
var file = _c[_b]; | ||
if (file.moduleExports) { | ||
file.patch(file.moduleExports, module_1.moduleVersion); | ||
try { | ||
for (var _d = __values(this._modules), _e = _d.next(); !_e.done; _e = _d.next()) { | ||
var module_1 = _e.value; | ||
if (typeof module_1.patch === 'function' && module_1.moduleExports) { | ||
module_1.patch(module_1.moduleExports, module_1.moduleVersion); | ||
} | ||
try { | ||
for (var _f = (e_2 = void 0, __values(module_1.files)), _g = _f.next(); !_g.done; _g = _f.next()) { | ||
var file = _g.value; | ||
if (file.moduleExports) { | ||
file.patch(file.moduleExports, module_1.moduleVersion); | ||
} | ||
} | ||
} | ||
catch (e_2_1) { e_2 = { error: e_2_1 }; } | ||
finally { | ||
try { | ||
if (_g && !_g.done && (_b = _f.return)) _b.call(_f); | ||
} | ||
finally { if (e_2) throw e_2.error; } | ||
} | ||
} | ||
} | ||
catch (e_1_1) { e_1 = { error: e_1_1 }; } | ||
finally { | ||
try { | ||
if (_e && !_e.done && (_a = _d.return)) _a.call(_d); | ||
} | ||
finally { if (e_1) throw e_1.error; } | ||
} | ||
return; | ||
@@ -137,8 +167,18 @@ } | ||
var this_1 = this; | ||
for (var _d = 0, _e = this._modules; _d < _e.length; _d++) { | ||
var module_2 = _e[_d]; | ||
_loop_1(module_2); | ||
try { | ||
for (var _h = __values(this._modules), _j = _h.next(); !_j.done; _j = _h.next()) { | ||
var module_2 = _j.value; | ||
_loop_1(module_2); | ||
} | ||
} | ||
catch (e_3_1) { e_3 = { error: e_3_1 }; } | ||
finally { | ||
try { | ||
if (_j && !_j.done && (_c = _h.return)) _c.call(_h); | ||
} | ||
finally { if (e_3) throw e_3.error; } | ||
} | ||
}; | ||
InstrumentationBase.prototype.disable = function () { | ||
var e_4, _a, e_5, _b; | ||
if (!this._enabled) { | ||
@@ -148,14 +188,32 @@ return; | ||
this._enabled = false; | ||
for (var _i = 0, _a = this._modules; _i < _a.length; _i++) { | ||
var module_3 = _a[_i]; | ||
if (typeof module_3.unpatch === 'function' && module_3.moduleExports) { | ||
module_3.unpatch(module_3.moduleExports, module_3.moduleVersion); | ||
} | ||
for (var _b = 0, _c = module_3.files; _b < _c.length; _b++) { | ||
var file = _c[_b]; | ||
if (file.moduleExports) { | ||
file.unpatch(file.moduleExports, module_3.moduleVersion); | ||
try { | ||
for (var _c = __values(this._modules), _d = _c.next(); !_d.done; _d = _c.next()) { | ||
var module_3 = _d.value; | ||
if (typeof module_3.unpatch === 'function' && module_3.moduleExports) { | ||
module_3.unpatch(module_3.moduleExports, module_3.moduleVersion); | ||
} | ||
try { | ||
for (var _e = (e_5 = void 0, __values(module_3.files)), _f = _e.next(); !_f.done; _f = _e.next()) { | ||
var file = _f.value; | ||
if (file.moduleExports) { | ||
file.unpatch(file.moduleExports, module_3.moduleVersion); | ||
} | ||
} | ||
} | ||
catch (e_5_1) { e_5 = { error: e_5_1 }; } | ||
finally { | ||
try { | ||
if (_f && !_f.done && (_b = _e.return)) _b.call(_e); | ||
} | ||
finally { if (e_5) throw e_5.error; } | ||
} | ||
} | ||
} | ||
catch (e_4_1) { e_4 = { error: e_4_1 }; } | ||
finally { | ||
try { | ||
if (_d && !_d.done && (_a = _c.return)) _a.call(_c); | ||
} | ||
finally { if (e_4) throw e_4.error; } | ||
} | ||
}; | ||
@@ -162,0 +220,0 @@ InstrumentationBase.prototype.isEnabled = function () { |
@@ -1,2 +0,2 @@ | ||
export declare const VERSION = "0.27.0"; | ||
export declare const VERSION = "0.28.0"; | ||
//# sourceMappingURL=version.d.ts.map |
@@ -17,3 +17,3 @@ /* | ||
// this is autogenerated file, see scripts/version-update.js | ||
export var VERSION = '0.27.0'; | ||
export var VERSION = '0.28.0'; | ||
//# sourceMappingURL=version.js.map |
@@ -29,8 +29,8 @@ "use strict"; | ||
function registerInstrumentations(options) { | ||
const { instrumentations } = autoLoaderUtils_1.parseInstrumentationOptions(options.instrumentations); | ||
const { instrumentations } = (0, autoLoaderUtils_1.parseInstrumentationOptions)(options.instrumentations); | ||
const tracerProvider = options.tracerProvider || api_1.trace.getTracerProvider(); | ||
const meterProvider = options.meterProvider || api_metrics_1.metrics.getMeterProvider(); | ||
autoLoaderUtils_1.enableInstrumentations(instrumentations, tracerProvider, meterProvider); | ||
(0, autoLoaderUtils_1.enableInstrumentations)(instrumentations, tracerProvider, meterProvider); | ||
return () => { | ||
autoLoaderUtils_1.disableInstrumentations(instrumentations); | ||
(0, autoLoaderUtils_1.disableInstrumentations)(instrumentations); | ||
}; | ||
@@ -37,0 +37,0 @@ } |
@@ -143,5 +143,5 @@ "use strict"; | ||
return supportedVersions.some(supportedVersion => { | ||
return semver_1.satisfies(version, supportedVersion, { includePrerelease }); | ||
return (0, semver_1.satisfies)(version, supportedVersion, { includePrerelease }); | ||
}); | ||
} | ||
//# sourceMappingURL=instrumentation.js.map |
@@ -25,3 +25,3 @@ "use strict"; | ||
this.unpatch = unpatch; | ||
this.name = path_1.normalize(name); | ||
this.name = (0, path_1.normalize)(name); | ||
} | ||
@@ -28,0 +28,0 @@ } |
@@ -1,2 +0,2 @@ | ||
export declare const VERSION = "0.27.0"; | ||
export declare const VERSION = "0.28.0"; | ||
//# sourceMappingURL=version.d.ts.map |
@@ -20,3 +20,3 @@ "use strict"; | ||
// this is autogenerated file, see scripts/version-update.js | ||
exports.VERSION = '0.27.0'; | ||
exports.VERSION = '0.28.0'; | ||
//# sourceMappingURL=version.js.map |
{ | ||
"name": "@opentelemetry/instrumentation", | ||
"version": "0.27.0", | ||
"version": "0.28.0", | ||
"description": "Base class for node which OpenTelemetry instrumentation modules extend", | ||
@@ -10,2 +10,3 @@ "author": "OpenTelemetry Authors", | ||
"module": "build/esm/index.js", | ||
"esnext": "build/esnext/index.js", | ||
"types": "build/src/index.d.ts", | ||
@@ -22,2 +23,3 @@ "publishConfig": { | ||
"./build/esm/platform/index.js": "./build/esm/platform/browser/index.js", | ||
"./build/esnext/platform/index.js": "./build/esnext/platform/browser/index.js", | ||
"./build/src/platform/index.js": "./build/src/platform/browser/index.js" | ||
@@ -29,2 +31,5 @@ }, | ||
"build/esm/**/*.d.ts", | ||
"build/esnext/**/*.js", | ||
"build/esnext/**/*.js.map", | ||
"build/esnext/**/*.d.ts", | ||
"build/src/**/*.js", | ||
@@ -38,6 +43,7 @@ "build/src/**/*.js.map", | ||
"scripts": { | ||
"compile": "tsc --build tsconfig.json tsconfig.esm.json", | ||
"clean": "tsc --build --clean tsconfig.json tsconfig.esm.json", | ||
"codecov": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../", | ||
"codecov:browser": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../", | ||
"prepublishOnly": "npm run compile", | ||
"compile": "tsc --build tsconfig.all.json", | ||
"clean": "tsc --build --clean tsconfig.all.json", | ||
"codecov": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../../", | ||
"codecov:browser": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../../", | ||
"lint": "eslint . --ext .ts", | ||
@@ -51,5 +57,6 @@ "lint:fix": "eslint . --ext .ts --fix", | ||
"version": "node ../../../scripts/version-update.js", | ||
"watch": "tsc --build --watch tsconfig.json tsconfig.esm.json", | ||
"precompile": "lerna run version --scope $(npm pkg get name) --include-filtered-dependencies", | ||
"prewatch": "node ../../../scripts/version-update.js" | ||
"watch": "tsc --build --watch tsconfig.all.json", | ||
"precompile": "lerna run version --scope $(npm pkg get name) --include-dependencies", | ||
"prewatch": "node ../../../scripts/version-update.js", | ||
"peer-api-check": "node ../../../scripts/peer-api-check.js" | ||
}, | ||
@@ -69,3 +76,3 @@ "keywords": [ | ||
"dependencies": { | ||
"@opentelemetry/api-metrics": "0.27.0", | ||
"@opentelemetry/api-metrics": "0.28.0", | ||
"require-in-the-middle": "^5.0.3", | ||
@@ -79,15 +86,15 @@ "semver": "^7.3.2", | ||
"devDependencies": { | ||
"@babel/core": "7.15.0", | ||
"@opentelemetry/api": "^1.0.3", | ||
"@babel/core": "7.16.0", | ||
"@opentelemetry/api": "^1.0.0", | ||
"@types/mocha": "8.2.3", | ||
"@types/node": "14.17.11", | ||
"@types/semver": "7.3.8", | ||
"@types/node": "14.17.33", | ||
"@types/semver": "7.3.9", | ||
"@types/shimmer": "1.0.2", | ||
"@types/sinon": "10.0.2", | ||
"@types/webpack-env": "1.16.2", | ||
"babel-loader": "8.2.2", | ||
"@types/sinon": "10.0.6", | ||
"@types/webpack-env": "1.16.3", | ||
"babel-loader": "8.2.3", | ||
"codecov": "3.8.3", | ||
"cpx": "1.5.0", | ||
"istanbul-instrumenter-loader": "3.0.1", | ||
"karma": "6.3.7", | ||
"karma": "6.3.16", | ||
"karma-chrome-launcher": "3.1.0", | ||
@@ -104,8 +111,8 @@ "karma-coverage-istanbul-reporter": "3.0.3", | ||
"ts-mocha": "8.0.0", | ||
"typescript": "4.3.5", | ||
"typescript": "4.4.4", | ||
"webpack": "4.46.0", | ||
"webpack-cli": "4.8.0", | ||
"webpack-cli": "4.9.1", | ||
"webpack-merge": "5.8.0" | ||
}, | ||
"gitHead": "f5e227f0cb829df1ca2dc220a3e0e8ae0e607405" | ||
"gitHead": "a0a670a03fd35b0799bee8cc466f79e93b5b6dd2" | ||
} |
# OpenTelemetry Instrumentation for web and node | ||
[![NPM Published Version][npm-img]][npm-url] | ||
[![dependencies][dependencies-image]][dependencies-url] | ||
[![devDependencies][devDependencies-image]][devDependencies-url] | ||
[![Apache License][license-image]][license-image] | ||
@@ -278,7 +276,3 @@ | ||
[license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat | ||
[dependencies-image]: https://status.david-dm.org/gh/open-telemetry/opentelemetry-js.svg?path=packages%2Fopentelemetry-instrumentation | ||
[dependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-instrumentation | ||
[devDependencies-image]: https://status.david-dm.org/gh/open-telemetry/opentelemetry-js.svg?path=packages%2Fopentelemetry-instrumentation&type=dev | ||
[devDependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-instrumentation&type=dev | ||
[npm-url]: https://www.npmjs.com/package/@opentelemetry/instrumentation | ||
[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Finstrumentation.svg |
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
264683
147
2803
278
3
+ Added@opentelemetry/api-metrics@0.28.0(transitive)
- Removed@opentelemetry/api-metrics@0.27.0(transitive)