The async_hooks module provides an API to register callbacks (hooks) tracking the lifetime of asynchronous resources created inside a Node.js application.
async_hooks