Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: async_hooks based context #124

Closed
SimenB opened this issue Aug 31, 2017 · 7 comments · Fixed by #476
Closed

Feature request: async_hooks based context #124

SimenB opened this issue Aug 31, 2017 · 7 comments · Fixed by #476

Comments

@SimenB
Copy link
Contributor

SimenB commented Aug 31, 2017

Node 8 has a new async hooks module, which should be able to replace zipkin-context-cls entirely, as well as work better (i.e. at all) for promises.

It's still experimental, but not behind a flag. No polyfills exists for older nodes (lots of C++ in the implementation, so probably not incoming either).

https://nodejs.org/api/async_hooks.html

Obligatory hype blog post: https://medium.com/the-node-js-collection/async-hooks-in-node-js-illustrated-b7ce1344111f &

/cc @sveisvei (#65 (comment))

@SimenB
Copy link
Contributor Author

SimenB commented Aug 31, 2017

Might be worth taking a look at a bridge for cls: https://www.npmjs.com/package/cls-hooked

@SimenB
Copy link
Contributor Author

SimenB commented Sep 18, 2017

Another alternative: https://www.npmjs.com/package/asyncctx

@anujshankar
Copy link

anujshankar commented Mar 31, 2018

Can use the below package instead of zipkin-context-cls for supporting async await.
https://www.npmjs.com/package/zipkin-context-cls-hooked

@Ghost---Shadow
Copy link

Ghost---Shadow commented Apr 3, 2018

@anujshankar :)
#201 solves this also #135

@mziemer21
Copy link

Is there an approach that doesn't use async hooks? There currently are performance issues with async hooks.

@jcchavezs
Copy link
Contributor

jcchavezs commented Jan 28, 2020

@mziemer21 not at the moment. Actually this is a good input for this discussion #201 (comment) cc @adriancole

@jcchavezs
Copy link
Contributor

More relevant information: DataDog/dd-trace-js#695

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants