Skip to content

feat(rpc): add usage metrics export tool#3494

Merged
t00ts merged 2 commits into
mainfrom
t00ts/metrics-export
Jul 3, 2026
Merged

feat(rpc): add usage metrics export tool#3494
t00ts merged 2 commits into
mainfrom
t00ts/metrics-export

Conversation

@t00ts

@t00ts t00ts commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

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_method gives us frequency.
  • latency_ms gives 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 a get... method is fine on latest but slow when using block_number/block_hash.
  • errors_by_kind to 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.

@t00ts t00ts marked this pull request as ready for review June 26, 2026 11:09
@t00ts t00ts requested a review from a team as a code owner June 26, 2026 11:09

@zvolin zvolin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this jq scares me a bit :D but LGTM 👍

@t00ts

t00ts commented Jul 2, 2026

Copy link
Copy Markdown
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.

@zvolin

Base automatically changed from t00ts/metrics to main July 3, 2026 05:14
@t00ts t00ts force-pushed the t00ts/metrics-export branch from 51dd5dd to 942e623 Compare July 3, 2026 05:55
@t00ts t00ts enabled auto-merge (rebase) July 3, 2026 05:55
@t00ts t00ts merged commit 4e131cc into main Jul 3, 2026
12 checks passed
@t00ts t00ts deleted the t00ts/metrics-export branch July 3, 2026 06:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants