-
Notifications
You must be signed in to change notification settings - Fork 550
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
automatic tracing of ws #12
Comments
Should we also support web socket on web too then ? |
Does websocket have a place to put the traceparent? afaik there is no way to add the tracing info without potentially modifying the user's payload? |
One per connection is of dubious value... Most websocket use cases are long running and encompass many user actions. |
I would love to take this task. Would take me some time to solve though. |
@nstawski Feel free to ping me if you need any help or guidance on that, i've already looked up on how to implement that in the past. |
Moving to contrib repo, also @nstawski did you started to work on that ? |
I for one would love this on both the node and browser side. I'd happily modify my payload with trace/span info to get tracing. Has anyone started to work on a solution for this? @vmarchaud |
@dajulia3 can you please confirm you are working on that ? |
@vmarchaud @obecny I'm not actively working on instrumenting that library per se... I'm about to implement a bit of custom instrumentation for socket stream rpc calls which an older node app is using. If there are any relevant learnings from that I'll be happy to share them. |
I'd really like to make this a thing -- does anyone have any insight into if this is harder than it seems or half baked work we could adapt into a PR? |
I don't think this is specially hard but it depend on what you want to achieve:
The last task is quite complicated because the ws protocol doesnt have any way to add metadata for a given message (as i said in one of my first messages is that you could do it for each connection but thats not for every use case). |
we just released a socket.io plugin check it out |
Will this work with |
no, only with the |
I put together this instrumentation for the We've been running it in production for a few weeks now and it has helped us understand our websocket woes a lot better. We'd would love any feedback from some early adopters, especially around what should constitute a new trace vs a span within a long lived connection like a websocket. I think we'll love to upstream it to this contrib repo after building a bit more confidence it is the right shape! Source here: https://github.com/gadget-inc/opentelemetry-instrumentations/tree/main/packages/opentelemetry-instrumentation-ws |
@airhorns nice work on I am running a fastify server and using |
Are there any plans to migrate the ws instrumentation to this repository? |
This PR extends the logic of applying lambda handler instrumentation in two ways. * Supporting handler defined in *.mjs files * Adding additinal InstrumentationNodeModuleDefinition matching by filename, which turns out to be what is needed in a module environment with the import-in-the-middle-hook
Is it applicable for Node or Browser or both
Node
Do you expect this plugin to be commonly used
Weekly Downloads: 10M (https://www.npmjs.com/package/ws)
What version of plugin are you interested in using
Versions: 5 - 7 (cover last 2 years of releases)
Additional context
I believe only elastic implemented an intrumentation for this module (https://github.com/elastic/apm-agent-nodejs/blob/master/lib/instrumentation/modules/ws.js)
The text was updated successfully, but these errors were encountered: