async_hook trace emitter to help you with your tracing needs. Fair warning, async_hook api is only available in node 8, and is an under an experimental flag.
var onAsyncHook = require('on-async-hook')
onAsyncHook(function (data) {
console.log(data)
})
Create an instance of onAsyncHook
. Calls a callback with data you can add to your logger.
Disable onAsyncHook
instance.
npm install on-async-hook