I posted requirements list for getting `async_hooks` into stable a while ago (https://github.com/nodejs/node/issues/14717#issuecomment-329755307). This is a very similar list. ### Internal Technical - [ ] Clarify breaking changes necessary for better performance (issue: https://github.com/nodejs/benchmarking/issues/181) - [x] Remove `promise` object from `PromiseWrap` (PR: https://github.com/nodejs/node/pull/23443) - [ ] Use a "`MicrotaskWrap`" instead of `PromiseWrap` (issue: https://github.com/nodejs/diagnostics/issues/389) - [ ] Setting up the benchmark suite to be run with and without `async_hooks` and see that there is only a small measurable difference given our tolerance. - [x] Deprecate `runInAsyncIdScope` (issue: https://github.com/nodejs/node/issues/14328, PR: https://github.com/nodejs/node/pull/16972) - [x] Deprecate `setTriggerId` (issue: https://github.com/nodejs/node/issues/14238, PR: https://github.com/nodejs/node/pull/16972) - [x] Implement internal replacement that we can optionally expose (PR: https://github.com/nodejs/node/pull/17273) - [x] Deprecate Sensitive Embedder API (issue: https://github.com/nodejs/node/issues/15572, PR: https://github.com/nodejs/node/pull/16972) - [x] Separate internal API from the external API (PR: https://github.com/nodejs/node/pull/16972). - [x] Remove deprecated API (PR: https://github.com/nodejs/node/pull/17147). - [x] Opt-out `async_hooks` state validation in v9.x. (PR: https://github.com/nodejs/node/pull/16318) - [ ] Make sure all nodecore uses of `MakeCallback` have an `async_context`. - [x] Integrate `async_hooks` into `NAN` (issue: https://github.com/nodejs/node/issues/13254). - [x] Integrate `async_hooks` into `n-api` (issue: https://github.com/nodejs/node/issues/13254). ### Internal Non-Technical - [ ] Specify whether a `triggerAsyncId` change will be a `semver-major`, `semver-minor` or `semver-patch`. - [ ] Identify "tolerance level" of perf impact of async-hooks, especailly regarding promises. - [ ] Is Async Hooks exposing the right logical model? (issue: https://github.com/nodejs/diagnostics/issues/143) ### External Non-Technical - [X] major APM vendor that uses `async_hooks` (N/Solid, [New Relic](https://blog.newrelic.com/2017/11/08/node-8-async-await-support/), [Elastic APM](https://github.com/elastic/apm-agent-nodejs/blob/master/lib/instrumentation/async-hooks.js)) - [X] npm modules with at least 5000 DL/month based on `async_hooks` (https://www.npmjs.com/package/trace & https://www.npmjs.com/package/cls-hooked) ### After Stable - [x] Deprecate `MakeCallback` without `async_context` (PR: https://github.com/nodejs/node/pull/18632)
I posted requirements list for getting
async_hooksinto stable a while ago (nodejs/node#14717 (comment)). This is a very similar list.Internal Technical
promiseobject fromPromiseWrap(PR: async_hooks: remove promise object from resource node#23443)MicrotaskWrap" instead ofPromiseWrap(issue: Proposal for reworking promise integration into async_hooks #389)async_hooksand see that there is only a small measurable difference given our tolerance.runInAsyncIdScope(issue: Remove async_hooks runInAsyncIdScope API node#14328, PR: async_hooks: deprecate undocumented API node#16972)setTriggerId(issue: Remove async_hooks setTrigger API node#14238, PR: async_hooks: deprecate undocumented API node#16972)async_hooksstate validation in v9.x. (PR: async_hooks: enable runtime checks by default node#16318)MakeCallbackhave anasync_context.async_hooksintoNAN(issue: Integrate C++ AsyncHooks Embedder API with native abstraction node#13254).async_hooksinton-api(issue: Integrate C++ AsyncHooks Embedder API with native abstraction node#13254).Internal Non-Technical
triggerAsyncIdchange will be asemver-major,semver-minororsemver-patch.External Non-Technical
async_hooks(N/Solid, New Relic, Elastic APM)async_hooks(https://www.npmjs.com/package/trace & https://www.npmjs.com/package/cls-hooked)After Stable
MakeCallbackwithoutasync_context(PR: src: deprecate legacy node::MakeCallback node#18632)