From 5a51c55bb237f5f699ea7edee8cf6cd6f1d77989 Mon Sep 17 00:00:00 2001 From: David Luna Date: Wed, 4 Dec 2024 10:50:29 +0100 Subject: [PATCH] fix(instr-mysql2): fix unwrap for mysql2@3.11.5 --- .../src/instrumentation.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugins/node/opentelemetry-instrumentation-mysql2/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-mysql2/src/instrumentation.ts index a7ab5d8f7d..a07af19654 100644 --- a/plugins/node/opentelemetry-instrumentation-mysql2/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-mysql2/src/instrumentation.ts @@ -79,8 +79,7 @@ export class MySQL2Instrumentation extends InstrumentationBase { if (moduleExports === undefined) return; - const ConnectionPrototype: mysqlTypes.Connection = - moduleExports.Connection.prototype; + const ConnectionPrototype = this._getConnectionPrototype(moduleExports); this._unwrap(ConnectionPrototype, 'query'); this._unwrap(ConnectionPrototype, 'execute'); }