From 69d1f17da0914fe14dc5d48512e8ae829267f605 Mon Sep 17 00:00:00 2001 From: Haddas Bronfman <85441461+haddasbronfman@users.noreply.github.com> Date: Wed, 3 May 2023 11:05:41 +0300 Subject: [PATCH] chore(mysql2): support version 3 (#1470) --- plugins/node/opentelemetry-instrumentation-mysql2/.tav.yml | 3 +++ plugins/node/opentelemetry-instrumentation-mysql2/README.md | 2 +- .../src/instrumentation.ts | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/plugins/node/opentelemetry-instrumentation-mysql2/.tav.yml b/plugins/node/opentelemetry-instrumentation-mysql2/.tav.yml index 83cb0a4139..36a11005c7 100644 --- a/plugins/node/opentelemetry-instrumentation-mysql2/.tav.yml +++ b/plugins/node/opentelemetry-instrumentation-mysql2/.tav.yml @@ -1,4 +1,7 @@ mysql2: + - versions: <4 >=3.2.0 || 3.1.0 || 3.0.0 + commands: npm run test + - versions: <3 >=2.3.2 || 2.3.0 || 2.2.5 || 2.1.0 # Skip 2.3.3 which installs types from git which takes 10m on it's own commands: npm run test diff --git a/plugins/node/opentelemetry-instrumentation-mysql2/README.md b/plugins/node/opentelemetry-instrumentation-mysql2/README.md index c828c21e27..d0940894b7 100644 --- a/plugins/node/opentelemetry-instrumentation-mysql2/README.md +++ b/plugins/node/opentelemetry-instrumentation-mysql2/README.md @@ -17,7 +17,7 @@ npm install --save @opentelemetry/instrumentation-mysql2 ## Supported Versions -- `>= 1.4.2, < 3.0` +- `>= 1.4.2, < 4.0` ## Usage diff --git a/plugins/node/opentelemetry-instrumentation-mysql2/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-mysql2/src/instrumentation.ts index fde904f2bf..682ebe0b04 100644 --- a/plugins/node/opentelemetry-instrumentation-mysql2/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-mysql2/src/instrumentation.ts @@ -50,7 +50,7 @@ export class MySQL2Instrumentation extends InstrumentationBase { return [ new InstrumentationNodeModuleDefinition( 'mysql2', - ['>= 1.4.2 < 3.0'], + ['>= 1.4.2 < 4.0'], (moduleExports: any, moduleVersion) => { api.diag.debug(`Patching mysql@${moduleVersion}`);