Using AsyncLocalStorage for Better Traceability in NodeJS Applications

NodeJS has a neat API called AsyncLocalStorage . It&rsquo;s used to share information across callbacks and promise chains. For example, it is useful to share information for all the code executed when serving a web request. I also found it very useful to keep trace information to easily keep track of which item was being processed during a batch process. The only caveat in my opinion, is that you…