Summary
I would like to propose the implementation of WebSocket monitoring support in GoVisual. The idea is to allow the dashboard to display not only HTTP requests, but also WebSocket handshakes and messages exchanged between client and server, grouped by connection.
Motivation
- Modern APIs often use WebSocket for real-time communication.
- This would make it much easier to debug and analyze Go applications that use WebSocket.
Proposed Solution
- Add optional fields to the RequestLog struct to identify WebSocket logs (e.g., connection ID, direction, message type).
- Create a helper (e.g., WrapWebSocket) to wrap WebSocket handlers and log handshakes and messages.
- Adapt the dashboard to visually differentiate and filter WebSocket logs.
Note
I have some doubts regarding the current structure of the project. As it stands, the architecture is designed to work only with the Wrap function for HTTP servers, and it is not able to handle other types of connections, such as WebSocket or gRPC.
I would appreciate feedback or suggestions on how we could refactor or redesign the core to make it more flexible and extensible for other communication types.
Summary
I would like to propose the implementation of WebSocket monitoring support in GoVisual. The idea is to allow the dashboard to display not only HTTP requests, but also WebSocket handshakes and messages exchanged between client and server, grouped by connection.
Motivation
Proposed Solution
Note
I have some doubts regarding the current structure of the project. As it stands, the architecture is designed to work only with the
Wrapfunction for HTTP servers, and it is not able to handle other types of connections, such as WebSocket or gRPC.I would appreciate feedback or suggestions on how we could refactor or redesign the core to make it more flexible and extensible for other communication types.