-
Notifications
You must be signed in to change notification settings - Fork 97
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
feat: Add Request ID header to RPC requests for easier debugging #2519
Comments
Hi! I'd like to address this issue, if that's alright. I have a couple of questions:
|
Hi @rferrandop, thanks for taking a look here (and sorry for the delay in responding). The place you pointed out for the code change looks correct to me. We already have a I'm not sure if @ahhda was thinks it is helpful to add RPC request id (there may be many downstream sub-requests for one top level API request being processed) as well or if we already have visibility into this. @ahhda could you advise? |
Currently, we don't have visibility around individual RPC requests. So if the driver crate reports an RPC request failed, we don't know which request does it correspond to in our RPC logs. I would say, generate a new UUID and add it as a header ( Adding existing |
RPC requests already have a unique ID per request (passed into the |
# Description Add a request id header for the RPC requests. # Changes <!-- List of detailed changes (how the change is accomplished) --> This PR adds the following request HTTP headers on RPC requests: - `X-RPC-Request-Id` - The unique ID of the RPC request. - `X-Request-Id` - The top level request id passed as a request header for the RPC request generated. ## How to test <!--- Include details of how to test your changes, including any pre-requisites. If no unit tests are included, please explain why and how to test manually 1. 2. 3. --> I couldn't find a suitable way to test this. Maybe, it would be useful to create tests for the RPC request execution and assert that those headers are been sending. ## Related Issues Fixes #2519 Co-authored-by: Martin Beckmann <martin.beckmann@protonmail.com>
I hereby enter the secret pass phrase: 🐮 |
Problem
Our JSON RPC requests currently don't send any information that would make it easier to track the particular request to debug. Adding the Request ID header to each JSON RPC request will help debug individual failing RPC calls.
Suggested solution
Add a unique request id header to all JSON RPC calls
This is what our request looks like currently:
The text was updated successfully, but these errors were encountered: