-
Notifications
You must be signed in to change notification settings - Fork 89
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
How to integrate with SocketIO #53
Comments
@averri Any luck figuring out how to setup with feathers? |
Hi @ppatel890, unfortunately I have abandoned the use of cls-hooked, I have re-engineered the application code to do not rely on cls-hooked. |
@averri - checking back in, any guidance on how you can have a requestId present throughout the entire socket 'request'? |
Hi @ppatel890, Nodejs 13 has a solution for this problem: In order to have a variable associated with the context of the current request it needs the support of AsyncLocalStorage in the SocketIO middleware. The AsycLocalStorage has similar features of this library, so it's recommended to move to AsyncLocalStorage. |
@averri This library already uses |
I'm trying to integrate the
cls_hooked
with SocketIO, using the Feathersjs framework:The
tracer.js
:... but the context is lost, it's not possible to get the 'ip' property from service functions.
The text was updated successfully, but these errors were encountered: