question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Migrate to core CLS API (AsyncLocalStorage)

See original GitHub issue

2.0.0 (or an experimental version of the library) could start using AsyncLocalStorage instead of cls-hooked: https://nodejs.org/api/async_hooks.html#async_hooks_class_asynclocalstorage

That should be done once AsyncLocalStorage is backported to Node.js v12.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
SimenBcommented, Jun 3, 2020

You of course know this already, but AsyncLocalStorage is available in v12.17. Do you have any timeline for when you’ll be able to start experimenting with it?

1reaction
SimenBcommented, Jun 8, 2020

Thanks @puzpuzpuz! Deployed to prod a couple of hours ago, and it’s looking good so far! The cases I knew where we lost context seems fixed now. I’ll check throughout the week if there are any cases we’re missing

Read more comments on GitHub >

github_iconTop Results From Across the Web

Integrate AsyncLocalStorage with EventEmitter #33723
I'm going to port this library to AsyncLocalStorage . As a part of this migration I need to make ALS play nicely with...
Read more >
AsyncLocalStorage for Easy Context Passing in Node.js
With Node.js 13.10, we got a a new feature called AsyncLocalStorage used to implement CLS (continuation local storage).
Read more >
Async hooks | Node.js v19.3.0 Documentation
Please migrate away from this API, if you can. ... Async context tracking use cases are better served by the stable AsyncLocalStorage API....
Read more >
nestjs-cls
A continuation-local* storage module compatible with NestJS' dependency injection based on AsyncLocalStorage. New: Version 3.0 introduces Proxy ...
Read more >
One Node.js CLS API to rule them all | by Andrey Pechkurov
Node.js v13.10.0 introduced a built-in CLS API, namely, ... I'd like to thank all core collaborators who made AsyncLocalStorage possible ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found