-
Notifications
You must be signed in to change notification settings - Fork 232
Add support for knex v0.18.0+ #1190
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
Comments
Hi, Thanks, |
Hi Sundar, |
I'm having the same issue than @christhegrand, is there anything we can do to make this issue move faster? Looks like #1497 has not solved this issue, as I'm using the latest version of the agent. I'm available to work on this if necessary. I've started by updating the pg instrumentation to support pg >= 8: #1735 Looks like this here: apm-agent-nodejs/lib/instrumentation/modules/pg.js Lines 47 to 48 in bca929c
Cannot create a new span because it cannot find an existing transaction (messages are on reverse order, check timestamp): |
The above issue was caused due to this #873 It's fixed with the latest version of Node.js I suppose this issue can be closed as v0.18.0+ is already supported |
I'm having the same issue with knex 0.21.19. I use node 14.17.0 and 3.18.0 of elastic-apm-node, load the data with // main.ts
import elasticApmNode from "elastic-apm-node/start";
.... It's a NestJS + Mikro-ORM project and I try to set the asyncHooks to false, as say in other issues but the span for knex isn't show. |
@Nisgrak can you provide an example query using knex code that reproduces the behavior you're describing? That's usually the quickest way for us to figure out what's going on and why a span isn't being generated. |
@Nisgrak A small-but-full program that reproduces the behavior you're seeing would be best. Also (especially if it's not possible for you to share a small-but-full program) if you could share the version of knex you're using, which database client driver (pg, mysql, etc.) you're using, and which version of the client driver that's at it'd be a big help. Basically we want/need to be able to run a program and see the same "not generating a span" behavior you're seeing. If we can do that, we can do some debugging, figure out the problem, and get a fix in. Does that make sense? |
@astorm The version of knex is 0.21.19. I create a test repo https://github.com/Nisgrak/test-nest-mikroorm-apm, anything you need please ask 😄 Thanks you! |
Thanks for the reproduction @Nisgrak -- looking things over it appears the code in https://github.com/Nisgrak/test-nest-mikroorm-apm uses the Our instrumentation of knex is (per supported technology) to get better stack trace visualization. The underlying DB queries still rely on our instrumentation of individual database packages. The Node.js Agent doesn't currently instrument the Was |
Hi @astorm, In fact I'm using the If I make a PR to make Thanks for all your help! |
No description provided.
The text was updated successfully, but these errors were encountered: