Skip to content

Issue with 3.11.5 mysql2 span not being generated #2590

@liustve

Description

@liustve

What version of OpenTelemetry are you using?

0.54.0 (latest)

What version of Node are you using?

v22.10.0

What did you do?

Set up an express server to make a call to a dummy nonexistant database using mysql2:
import mysql from 'mysql2';

const connection = mysql.createConnection({
host: process.env.DB_HOST,
user: process.env.DB_USER,
password: process.env.DB_PASSWORD
});

connection.query(
'CREATE DATABASE IF NOT EXISTS db',
(err, results) => {
if (err) {
console.error('Error creating database:', err);
return;
}
console.log('Database created successfully');
}
);

Ran using version 3.11.4, db span exists and gets populated:
image

Ran using version 3.11.5, no db span:
image

What did you expect to see?

DB span to populate in newest mysql2 version

What did you see instead?

No span running on the latest mysql2 version and latest otel js version.

Additional context

Related issue: aws-observability/aws-otel-js-instrumentation#127

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingneeds:reproducerThis bug/feature is in need of a minimal reproducerpkg-status:unmaintainedThis package is unmaintained. Only bugfixes may be acceped until a new owner has been found.pkg:instrumentation-mysql2priority:p2Bugs and spec inconsistencies which cause telemetry to be incomplete or incorrect

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions