-
Notifications
You must be signed in to change notification settings - Fork 400
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
MongoDB find doesn't close the segment #104
Comments
Thanks for filing this, Peeter! Fixing this issue would definitely make Mongo numbers more accurate and useful, but requires a couple minor but significant changes to the module's architecture. Right now there's one timer per trace segment, and it can only be stopped once. Proper exclusive time calculation (for transaction breakdowns) requires multiple timers per trace for stream-like objects like MongoDB's cursors, so, for example, that each callback involved as part of consuming the cursor as a document stream gets timed. Switching to timing the segment in terms of the last time a MongoDB cursor was accessed instead of waiting for the entire result set to be consumed would more accurately map to how people actually use MongoDB, especially with Mongoose. There's a bunch of weird edge cases related to getting all this right in Node's async world, especially because the underlying representation used by New Relic is pretty unfriendly to async concurrency. As such, it may take a little while to get addressed, and may be done as part of a larger project to make New Relic deal better with the async data coming from Node. Patience is advised. |
We made a change (139de31) that should address this issue in New Relic for Node.js 1.4.0, although it's not the 100% fix (which requires the architectural changes I mentioned above). For now, the segments will be closed. Getting accurate exclusive timings is deferred for a later date. I'm going to close this for now, and you can reopen or file a new ticket if the fix we came up with doesn't work for your case. |
…/error-fingerprinting/semver-5.7.2 chore(deps): bump semver from 5.7.1 to 5.7.2 in /error-fingerprinting
Fixed several dev dep audit warnings.
Change custom assertion name to avoid clash with test-utils
app.js
package.json
Results in:
The text was updated successfully, but these errors were encountered: