-
Notifications
You must be signed in to change notification settings - Fork 544
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue with 3.11.5 mysql2 span not being generated #2590
Comments
huh, weird - I thought this was fixed in #2579 |
@liustve thanks for reaching out - assigning P2 (incomplete or missing telemetry). |
Hi @liustve I've tried to reproduce the issue with no luck in this small project. For both versions of mysql2 (3.11.4 & 3.11.5) the instrumentation gets the db statement. When you mention the version this is the list of dependencies of the project npm ls
[email protected] /Users/david/Documents/repos/dl/otel-js-contrib-2590
├── @opentelemetry/[email protected]
├── @opentelemetry/[email protected]
├── @opentelemetry/[email protected]
├── @opentelemetry/[email protected]
├── @opentelemetry/[email protected]
├── @opentelemetry/[email protected]
├── @opentelemetry/[email protected]
├── @types/[email protected]
├── [email protected]
├── [email protected]
└── [email protected] could yo give me some directions on hot to reproduce the issue? |
Hi David, the package that I was using for this issue is v0.54.0: The instrumentation I was using for mysql2 matches your version (0.44.0). Thanks! |
Can reproduce. Downgrading mysql2 fixed it for me. Edit: |
@liustve @alexa-gt I've updated the small project mentioned in #2590 (comment) to use auto instrumentations and the CLI option to register it. I'm still seeing the span being sent to the collector. Could you provide a more complete example to reproduce the error? Is that call to a nonexistant DB inside an express middleware perhaps? |
Nope, it exists and is in an express handler. As attached with latest As requested, otel_poc.zip @david-luna Can I see your |
Hi @pichlermarc your fix seems to work only importing from @david-luna that's why you don't replicate in your project To reproduce you can use https://github.com/macno/otel-js-contrib-2590 |
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:
Ran using version 3.11.5, no db span:
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
The text was updated successfully, but these errors were encountered: