-
Notifications
You must be signed in to change notification settings - Fork 312
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
MySQL Pooled queries have the wrong parent #175
Comments
I cannot reproduce this issue specifically since the provided snippet gives me the correct span. I was however able to cause a similar issue related to the internal queue of the @fragglebob If I open a PR, would you be able to try it out directly? |
The snippet I shared produces the correct span. It's the way I've got round the issue for now. Sure, I can give it a go tomorrow. |
I meant that even without Here's the PR: #178 |
I get ya now. I think it might have been from using a combination of express, graphql and mysql together. I will give it a go tomorrow. 👍 If I get some time I will figure out how to cause it in a smaller example. |
Yep, that fixes it completely. |
I noticed in DataDog that none of my traces had database calls, except for the first query, which seemed to have them all belong to it.
After loads of debugging I worked out its down to the current span in the query being the span that creates the connection.
My solution for now was to stop using
pool.query
and usepool.getConnection
, however I had to bind the callback to get the correct span for the query.The problem happens in
pool.acquireConnection
, when it entersonOperationComplete
the span is changed to that original one.The text was updated successfully, but these errors were encountered: