-
Notifications
You must be signed in to change notification settings - Fork 98
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
mysql2 requests aren't being attached to root scope #946
Comments
Thanks for reporting this -- I'm looking into it now. |
No problem. I spent the evening trying to work it out too. Think it could be knex’s use of bluebird for promises. Will update with anything further I find today. |
I think I've found the issue -- it seems that the Trace Agent (or anything reliant on This is a problem that is only addressable in Node core, I'll scan the issue list shortly and add it if it's not there. In the meantime, it seems like this functions as a workaround:
|
It seems like it is indeed a variant of an existing issue: nodejs/node#22360. On that note, however, it seems like a more immediate solution is to move forward with the bluebird plugin PR that I had open a while ago. I'll try to amend it to work for this use case as well and see if I can land it this week. |
I'm glad to see this issue - I've been struggling with connecting distributed traces from a js grpc client, but I too am promisifying those methods with bluebird, so hopefully that PR will help. |
Sorry that this has been stalled. I believe this is a fix that must be done in Node itself and not in userspace, so unfortunately I can't amend the bluebird PR to address this issue. You can follow the Node bug here: nodejs/node#26064 |
It looks like Bluebird has been removed in the newest release of knex. Does anyone know if this issue is fixed now? |
@giuliano-barberi-tf I have tested this today, and it isn't fixed. |
Experiencing a similar issue with Sequelize v5 |
The log is outputting
INFO TraceApi#createChildSpan: [mysql2@1.6.4:lib/connection.js] Creating phantom child span [mysql-query] because there is no root span.
.My setup is using knex with the client
mysql2
. The query is running in the knexraw
method.This is an example app: https://github.com/davidharrisonlb/mysql-tracer-test
The text was updated successfully, but these errors were encountered: