This repository was archived by the owner on Nov 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Trace response payload in default jsonrpsee middleware
#12886
Merged
paritytech-processbot
merged 2 commits into
paritytech:master
from
moonbeam-foundation:tgm-extra-rpc-metrics
Dec 9, 2022
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next
Next commit
Trace result in default
jsonrpsee middleware
- Loading branch information
commit f9fc7dd57bd8e33bb9b083734c8c5f6f548fc26d
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure about the naming, can we not also just name it
rpc_metrics?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's just to not interfere with the current setups. Node operators probably enable
rpctarget to get stats on rpc method call usage but likely don't care about the response payload in most cases, which can get quite big in size (and expensive to store) and is mostly useful in development environments to just debug. Separating both targets one can choose the granularity.Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can already get this with
RUST_LOG="jsonrpsee=trace"(except the transport label) that log is super-noisy but shouldn't matter for development environments.in addition jsonrpsee actually has separate tracing spans for each RPC method call to filter out stuff but it doesn't play well with the logger in substrate, I should probably fix that at some point.
however we truncate logs bigger 4096 characters currently, so I guess it could be useful
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
People should not get metrics by parsing logs. They should use prometheus. Let's change the target name. If people are requiring better metrics, they should open issues and say what they need.