Async Hooks

Node.js async_hooks module — async execution context tracking.

Module: node:async_hooks Support: Experimental Since: 1.1.0 Docs: Node.js Docs See also: https://nodejs.org/api/async_hooks.html

Static Methods

🟢 createHook(callbacks)
Creates a new AsyncHook instance.
🟢 executionAsyncId()
Returns the asyncId of the current execution context.
🟢 triggerAsyncId()
Returns the ID of the resource responsible for calling the callback

Properties

🟢 AsyncLocalStorage
The AsyncLocalStorage class.
🟢 AsyncResource
The AsyncResource class.