22
33<!-- introduced_in=v8.1.0-->
44
5- > Stability: 1 - Experimental
5+ > Stability: 1 - Experimental. Please migrate away from this API, if you can.
6+ > We do not recommend using the [ ` createHook ` ] [ ] , [ ` AsyncHook ` ] [ ] , and
7+ > [ ` executionAsyncResource ` ] [ ] APIs as they have usability issues, safety risks,
8+ > and performance implications. Async context tracking use cases are better
9+ > served by the stable [ ` AsyncLocalStorage ` ] [ ] API. If you have a use case for
10+ > ` createHook ` , ` AsyncHook ` , or ` executionAsyncResource ` beyond the context
11+ > tracking need solved by [ ` AsyncLocalStorage ` ] [ ] or diagnostics data currently
12+ > provided by [ Diagnostics Channel] [ ] , please open an issue at
13+ > < https://github.com/nodejs/node/issues > describing your use case so we can
14+ > create a more purpose-focused API.
615
716<!-- source_link=lib/async_hooks.js -->
817
@@ -869,14 +878,18 @@ The documentation for this class has moved [`AsyncResource`][].
869878The documentation for this class has moved [` AsyncLocalStorage` ][].
870879
871880[DEP0111]: deprecations.md#dep0111-processbinding
881+ [Diagnostics Channel]: diagnostics_channel.md
872882[Hook Callbacks]: #hook-callbacks
873883[PromiseHooks]: https://docs.google.com/document/d/1rda3yKGHimKIhg5YeoAmCOtyURgsbTH_qaYR79FELlk/edit
884+ [` AsyncHook` ]: #class-asynchook
874885[` AsyncLocalStorage` ]: async_context.md#class-asynclocalstorage
875886[` AsyncResource` ]: async_context.md#class-asyncresource
876887[` Worker ` ]: worker_threads.md#class-worker
877888[` after` callback]: #afterasyncid
878889[` before` callback]: #beforeasyncid
890+ [` createHook` ]: #async_hookscreatehookcallbacks
879891[` destroy` callback]: #destroyasyncid
892+ [` executionAsyncResource` ]: #async_hooksexecutionasyncresource
880893[` init` callback]: #initasyncid-type-triggerasyncid-resource
881894[` process .getActiveResourcesInfo ()` ]: process.md#processgetactiveresourcesinfo
882895[` promiseResolve` callback]: #promiseresolveasyncid
0 commit comments