From 1db1fecc16ecb3dbad530de530418260e54c087a Mon Sep 17 00:00:00 2001 From: Ran Nozik Date: Thu, 14 Jul 2022 17:47:50 +0300 Subject: [PATCH] fix: mongodb unwrapping (#1089) --- .../src/instrumentation.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/node/opentelemetry-instrumentation-mongodb/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-mongodb/src/instrumentation.ts index 5e078f9ccd..7f87a960ee 100644 --- a/plugins/node/opentelemetry-instrumentation-mongodb/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-mongodb/src/instrumentation.ts @@ -158,7 +158,7 @@ export class MongoDBInstrumentation extends InstrumentationBase< diag.debug(`Applying patch for mongodb@${moduleVersion}`); // patch insert operation if (isWrapped(moduleExports.Connection.prototype.command)) { - this._unwrap(moduleExports, 'command'); + this._unwrap(moduleExports.Connection.prototype, 'command'); } this._wrap(