feat(rpc): add usage metrics export tool#3494
Merged
Merged
Conversation
vbar
approved these changes
Jul 2, 2026
zvolin
approved these changes
Jul 2, 2026
zvolin
left a comment
Contributor
There was a problem hiding this comment.
this jq scares me a bit :D but LGTM 👍
Contributor
Author
|
I also wasn't familiar with it but it seems to work and apparently is pretty common for quick scripts like this one... Certainly better than building the JSON with bash, and I didn't want the python overhead on this one. Should be super easy to run. |
51dd5dd to
942e623
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR closes the metrics task.
Adds a publicly auditable export script that we can share with providers so they run it and send us standardized usage stats we can act on.
Goal was to know where to focus our optimization efforst - if any.
calls_by_methodgives us frequency.latency_msgives us a per-call cost proxy.A method that's high on both is a clear target. In turn, a method that's slow but just called 200 times a week, well, we can probably pass until the high-volume calls are optimized first.
Then we have other goodies like:
block_target_split. This one narrow the path for us to look into. Maybe we see that aget...method is fine onlatestbut slow when usingblock_number/block_hash.errors_by_kindto see where we're errorring most.All in all, this is just a start. We can keep building on top of this. For now, this should help us pick what to optimize without having anyone do extra work.