-
Notifications
You must be signed in to change notification settings - Fork 227
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
there are no spans for queries w/out exec() for mongoose 5.6.3 #1550
Comments
This is an unresolved issue with Promise Hooks in V8 and async_hooks in Node.js core. nodejs/node#22360 The only way to make this work is to fix it in V8. |
Thank you for your reply. Probably it makes sense to update docs to explicitly highlight that fact about custom thenable. Feel free to close the ticket. |
does this also affects |
nodejs/node#22360 (comment) async_hooks was fixed |
Yep, I fixed the issue in V8 a few months ago. It's in Node.js 14.x. Still waiting on the backport to land in 12.x. |
Just came across this issue and did some test to see if still apply. Mongoose is added to the support list in I've used this example from the main branch to test also with the latest version of the
Mongoose eersions tested were: 7.6.3, 6.12.2, 5.13.21 & 5.6.3 So I'm inclined to close this one @evgeni-k if there is nothing else to look |
this is breaking for mongoose 8.03 |
me too. [email protected] |
It is working fine on latest version of packages |
Describe the bug
The library does not automatically creates span if there is no explicit
exec()
function call on query object.Mongoose uses native Promise.
Following code snippet is instrumented perfectly and span is created
This code snippet cannot be automatically instrumented (span cannot be created)
Mongoose automatically calls
exec
whenthen
is called https://github.com/Automattic/mongoose/blob/5.6.3/lib/query.js#L4297-L4299To Reproduce
Run code snippets below in your app.
If you run with explicit
exec
call then span is created otherwise it won't.Expected behavior
Span should be created w/ and w/out explicit
exec
function call.Environment (please complete the following information)
How are you starting the agent? (please tick one of the boxes)
agent.start()
directly (e.g.require('elastic-apm-node').start(...)
)elastic-apm-node/start
from within the source code-r elastic-apm-node/start
The text was updated successfully, but these errors were encountered: