async_hooks
The Node.js module that tracks the creation and completion of asynchronous resources; its low-level createHook() API is discouraged in favour of AsyncLocalStorage.
In more detail
AsyncLocalStorage is exported from this module. Application code should use it rather than raw hooks, which are slow and hard to use correctly.
Related terms
- AsyncLocalStorage — A Node.js class that keeps a value, such as the current request's ID, available to every function called during one asynchronous operation, without passing it as an argument.
Taught in
- Routing & Middleware: Path Parsing & Async Context — Node.js Internals & Backend Services