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