@opentelemetry/instrumentation-ioredis
Advanced tools
Comparing version 0.33.1 to 0.33.2
@@ -52,3 +52,3 @@ "use strict"; | ||
if (config === null || config === void 0 ? void 0 : config.requestHook) { | ||
instrumentation_2.safeExecuteInTheMiddle(() => config === null || config === void 0 ? void 0 : config.requestHook(span, { | ||
(0, instrumentation_2.safeExecuteInTheMiddle)(() => config === null || config === void 0 ? void 0 : config.requestHook(span, { | ||
moduleVersion, | ||
@@ -74,3 +74,3 @@ cmdName: cmd.name, | ||
cmd.resolve = function (result) { | ||
instrumentation_2.safeExecuteInTheMiddle(() => { var _a; return (_a = config === null || config === void 0 ? void 0 : config.responseHook) === null || _a === void 0 ? void 0 : _a.call(config, span, cmd.name, cmd.args, result); }, e => { | ||
(0, instrumentation_2.safeExecuteInTheMiddle)(() => { var _a; return (_a = config === null || config === void 0 ? void 0 : config.responseHook) === null || _a === void 0 ? void 0 : _a.call(config, span, cmd.name, cmd.args, result); }, e => { | ||
if (e) { | ||
@@ -80,3 +80,3 @@ api_1.diag.error('ioredis instrumentation: response hook failed', e); | ||
}, true); | ||
utils_1.endSpan(span, null); | ||
(0, utils_1.endSpan)(span, null); | ||
origResolve(result); | ||
@@ -86,3 +86,3 @@ }; | ||
cmd.reject = function (err) { | ||
utils_1.endSpan(span, err); | ||
(0, utils_1.endSpan)(span, err); | ||
origReject(err); | ||
@@ -93,3 +93,3 @@ }; | ||
catch (error) { | ||
utils_1.endSpan(span, error); | ||
(0, utils_1.endSpan)(span, error); | ||
throw error; | ||
@@ -122,7 +122,7 @@ } | ||
const client = original.apply(this, arguments); | ||
utils_1.endSpan(span, null); | ||
(0, utils_1.endSpan)(span, null); | ||
return client; | ||
} | ||
catch (error) { | ||
utils_1.endSpan(span, error); | ||
(0, utils_1.endSpan)(span, error); | ||
throw error; | ||
@@ -137,7 +137,7 @@ } | ||
api_1.diag.debug('Applying patch for ioredis'); | ||
if (instrumentation_1.isWrapped(moduleExports.prototype.sendCommand)) { | ||
if ((0, instrumentation_1.isWrapped)(moduleExports.prototype.sendCommand)) { | ||
this._unwrap(moduleExports.prototype, 'sendCommand'); | ||
} | ||
this._wrap(moduleExports.prototype, 'sendCommand', this._patchSendCommand(moduleVersion)); | ||
if (instrumentation_1.isWrapped(moduleExports.prototype.connect)) { | ||
if ((0, instrumentation_1.isWrapped)(moduleExports.prototype.connect)) { | ||
this._unwrap(moduleExports.prototype, 'connect'); | ||
@@ -144,0 +144,0 @@ } |
@@ -1,5 +0,3 @@ | ||
/// <reference types="node" /> | ||
/// <reference types="mocha" /> | ||
import { Span } from '@opentelemetry/api'; | ||
export declare const endSpan: (span: Span, err: NodeJS.ErrnoException | null | undefined) => void; | ||
//# sourceMappingURL=utils.d.ts.map |
@@ -1,2 +0,2 @@ | ||
export declare const VERSION = "0.33.1"; | ||
export declare const VERSION = "0.33.2"; | ||
//# sourceMappingURL=version.d.ts.map |
@@ -20,3 +20,3 @@ "use strict"; | ||
// this is autogenerated file, see scripts/version-update.js | ||
exports.VERSION = '0.33.1'; | ||
exports.VERSION = '0.33.2'; | ||
//# sourceMappingURL=version.js.map |
{ | ||
"name": "@opentelemetry/instrumentation-ioredis", | ||
"version": "0.33.1", | ||
"version": "0.33.2", | ||
"description": "OpenTelemetry ioredis automatic instrumentation package.", | ||
@@ -55,3 +55,3 @@ "main": "build/src/index.js", | ||
"@opentelemetry/context-async-hooks": "^1.8.0", | ||
"@opentelemetry/contrib-test-utils": "^0.33.0", | ||
"@opentelemetry/contrib-test-utils": "^0.33.1", | ||
"@opentelemetry/sdk-trace-base": "^1.8.0", | ||
@@ -68,9 +68,9 @@ "@opentelemetry/sdk-trace-node": "^1.8.0", | ||
"rimraf": "3.0.2", | ||
"sinon": "14.0.0", | ||
"sinon": "15.0.1", | ||
"test-all-versions": "5.0.1", | ||
"ts-mocha": "10.0.0", | ||
"typescript": "4.3.5" | ||
"typescript": "4.4.4" | ||
}, | ||
"dependencies": { | ||
"@opentelemetry/instrumentation": "^0.34.0", | ||
"@opentelemetry/instrumentation": "^0.35.1", | ||
"@opentelemetry/redis-common": "^0.34.0", | ||
@@ -81,3 +81,3 @@ "@opentelemetry/semantic-conventions": "^1.0.0", | ||
"homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/opentelemetry-instrumentation-ioredis#readme", | ||
"gitHead": "8472e8273d14993a13f921b6f8173b20fb37a383" | ||
"gitHead": "63e0fc9b6b862f74304abf0343c506a5bd415191" | ||
} |
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
41335
331
+ Added@opentelemetry/instrumentation@0.35.1(transitive)
- Removed@opentelemetry/instrumentation@0.34.0(transitive)