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.

💡 Describe the solution you’d like

I want to see websocket messages send from server and messages send from client (application)

🙋 Do you want to develop this feature yourself?

  • Yes
  • No If you provide some advice how add this feature or provide classes name to start analyzyng source code to add this feature.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:1
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
MiSikoracommented, Aug 2, 2021

It would be a hard task. Chucker uses interceptor API to inspect HTTP requests. Web sockets do not use this mechanism and the only thing you could do is to implement WebSocketListener and try to inspect messages. Though I say try because it is very complex task (might even not be feasible to make it properly ATM). Things to consider:

  • Should there be a separate ChuckerWebSocketListener or make ChuckerInterceptor implement required interface.
  • How to handle incoming messages? Text-based is easy. But recently, we added BodyDecoder interface to enable parsing of custom data by users, so we should think of support for binary–based messages.
  • How to display this data in the UI? Same tab for HTTPS and WS traffic doesn’t seem IMO optimal.
  • How to store data in the database? Currently it’s not that great to add new models. #259
  • Should we support all WS events or only messages? Former is better but it complicates UI and data model.
0reactions
cortinicocommented, Nov 26, 2022

Given the current state of the library I’m not sure this is a straightforward thing to achieve, but would be interesting to know whether this is a direction the library would take, or whether I should explore something like this independantly.

I’m currently working on https://github.com/ChuckerTeam/chucker/issues/259 It will be possible to inject custom HTTP events inside Chucker in the future. I haven’t thought about making it a fully multi-purpose data module, but shouldn’t be that hard after we implement #259

Read more comments on GitHub >

github_iconTop Results From Across the Web

Logging - websockets 10.4 documentation - Read the Docs
Instead, when running as a server, websockets logs one event when a connection is established and another event when a connection is closed....
Read more >
Configuring logging for a WebSocket API - Amazon API Gateway
Configuring logging for a WebSocket API ... You can enable logging to write logs to CloudWatch Logs. You can use logging variables to...
Read more >
Get the console log of website and send to websocket
I want to get the console log of a website and send that to WebSocket clients. I was able to create a node...
Read more >
Logging Reference - WebSocket++
WebSocket ++ has the capability of logging events during the lifetime of the connections that it processes. Each endpoint has two independent logging...
Read more >
Writing WebSocket client applications - Web APIs | MDN
WebSocket client applications use the WebSocket API to communicate with WebSocket ... Login handshake; Message text; User list updates.
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