diff --git a/plugins/node/opentelemetry-instrumentation-redis-4/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-redis-4/src/instrumentation.ts index b4b229f66f..4bf503e6c4 100644 --- a/plugins/node/opentelemetry-instrumentation-redis-4/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-redis-4/src/instrumentation.ts @@ -175,6 +175,15 @@ export class RedisInstrumentation extends InstrumentationBase { this._getPatchRedisClientMulti() ); + if (isWrapped(redisClientPrototype?.MULTI)) { + this._unwrap(redisClientPrototype, 'MULTI'); + } + this._wrap( + redisClientPrototype, + 'MULTI', + this._getPatchRedisClientMulti() + ); + if (isWrapped(redisClientPrototype?.sendCommand)) { this._unwrap(redisClientPrototype, 'sendCommand'); } @@ -198,6 +207,9 @@ export class RedisInstrumentation extends InstrumentationBase { if (isWrapped(redisClientPrototype?.multi)) { this._unwrap(redisClientPrototype, 'multi'); } + if (isWrapped(redisClientPrototype?.MULTI)) { + this._unwrap(redisClientPrototype, 'MULTI'); + } if (isWrapped(redisClientPrototype?.sendCommand)) { this._unwrap(redisClientPrototype, 'sendCommand'); }