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

JSON/RPC responses not traced when using web sockets #6276

Closed
matthew1001 opened this issue Dec 11, 2023 · 1 comment · Fixed by #6285
Closed

JSON/RPC responses not traced when using web sockets #6276

matthew1001 opened this issue Dec 11, 2023 · 1 comment · Fixed by #6285
Labels
bug Something isn't working good first issue Good for newcomers logging

Comments

@matthew1001
Copy link
Contributor

matthew1001 commented Dec 11, 2023

Description

With TRACE log level enabled, JSON/RPC responses are not traced when using JSON/RPC over web sockets. They are for JSON/RPC over HTTP.

Acceptance Criteria

Include JSON/RPC responses in web socket

Logs (if a bug)

Here is an example of the logs you see with TRACE enabled for JSON/RPC over HTTP:

2023-12-11 10:38:45.976+00:00 | vert.x-worker-thread-0 | TRACE | AbstractJsonRpcExecutor | {"jsonrpc":"2.0","method":"eth_chainId","id":1}
2023-12-11 10:38:45.998+00:00 | vert.x-worker-thread-0 | DEBUG | JsonRpcExecutor | JSON-RPC request -> eth_chainId null
2023-12-11 10:38:46.002+00:00 | vert.x-worker-thread-0 | TRACE | AbstractJsonRpcExecutor | {"jsonrpc":"2.0","id":1,"result":"0x539"}

However, for JSON/RPC over web sockets the response isn't logged:

2023-12-11 10:41:58.637+00:00 | vert.x-eventloop-thread-1 | DEBUG | WebSocketService | Received Websocket request (binary frame) { "jsonrpc": "2.0", "method": "eth_chainId", "params": [], "id": 51 } (host=127.0.0.1, port=56603)
2023-12-11 10:41:58.689+00:00 | vert.x-worker-thread-0 | DEBUG | JsonRpcExecutor | JSON-RPC request -> eth_chainId []
2023-12-11 10:41:58.695+00:00 | vert.x-eventloop-thread-1 | TRACE | WebSocket08FrameEncoder | Encoding WebSocket Frame opCode=1 length=43
2023-12-11 10:42:00.260+00:00 | vert.x-eventloop-thread-1 | TRACE | WebSocket08FrameEncoder | Encoding WebSocket Frame opCode=8 length=2
2023-12-11 10:42:00.264+00:00 | vert.x-eventloop-thread-1 | TRACE | WebSocket08FrameDecoder | Decoding WebSocket Frame opCode=8
2023-12-11 10:42:00.264+00:00 | vert.x-eventloop-thread-1 | TRACE | WebSocket08FrameDecoder | Decoding WebSocket Frame length=2

Versions

  • Software version: I captured the above logs with 23.10.2
@matthew1001 matthew1001 added bug Something isn't working good first issue Good for newcomers logging labels Dec 11, 2023
@matthew1001
Copy link
Contributor Author

(The WebSocket08FrameEncoder log entries come the io.netty.handler.codec.http.websocketx library)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers logging
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant