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(