Glad that you liked the article. Thanks for the feedback!

As for the zero-cost async stack traces in V8 (the one that is available with — — async-stack-traces flag), it’s a completely different feature. It provides much more precise stack traces for any errors that are happening in async/await call chains. So this is an out-of-the-box feature and it doesn’t assume any API for developers.

On the other hand, Async Hooks is not directly related with async/await or error handling and provides a general purpose, flexible API for dealing with any async calls. As for the footprint, Async Hooks are definitely not zero-cost (yet it’s not super-heavy), as resources and contexts need to be tracked, and listenters need to be called.

Distributed systems gazer. Node.js contributor. Occasional tech blogger and speaker.

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store