Skip to content

feat(metrics): add RPC requests panel and per-node Overview tables - #224

Merged
panos-xyz merged 5 commits into
mainfrom
feat/grafana-rpc-requests-panel
Nov 11, 2026
Merged

panos-xyz merged 5 commits into
mainfrom
feat/grafana-rpc-requests-panel

Conversation

@panos-xyz

@panos-xyz panos-xyz commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Two dashboard changes in etc/grafana/dashboards/morph-reth.json:

  1. New panel: RPC Requests (Per Minute) By Role at the end of the RPC row — the same per-node request-volume view operators already use for geth (rpc_requests).
  2. Overview readability fix: Build Info and the storage panels now render one row per node, so their values stay attributable when several services are selected.

1. RPC Requests (Per Minute) By Role

sum by (service) (rate(reth_rpc_server_calls_started_total{chain="$chain", role=~"$role", service=~"$service"}[$__rate_interval])) * 60

Grouping by service follows the existing "Engine API Failures By Role" panel. Unit is reqpm, which Grafana displays as req/m. Existing panels, including RPC Throughput, are unchanged.

Why calls_started_total

  • It counts every entry of a batch request. reth_rpc_server_connections_requests_started_total only counts non-batch requests, and calls_successful_total / calls_failed_total are never incremented for batch entries: jsonrpsee 0.26 dispatches batch entries through the innermost service, bypassing the metrics layer's call().
  • It includes failed calls, like geth's rpc_requests.

Difference from geth's rpc_requests

geth's counter is a package-level global in its rpc package, so it also counts calls on the authenticated Engine API port (morphnode's engine_* calls on 8551). reth installs the RPC metrics layer only on the HTTP/WS/IPC servers, not on the auth server, so this panel excludes Engine API traffic. That is intended: the panel tracks public RPC load.

When a node is switched from geth to morph-reth, this panel will read lower than the geth panel by the Engine API call volume, even with identical external traffic. geth's Engine API share can be read from rpc_duration_engine_*_count. morphnode's own eth_* calls over HTTP are counted on both clients.

2. Overview: per-node build info and storage

With more than one service selected the Overview row was unreadable:

  • Build Info rendered every node's values side by side in a single stat row, so they overlapped once several nodes matched.
  • Database / Freelist / Static Files / Total each used a global sum() across all services, leaving a single number with no way to tell which node it came from. Header Height had the same crowding problem in a 3-wide column.

Both are now tables with one row per node:

  • Build Info is a table keyed by service: version, git SHA, build time, profile, target and features per node. One max by (service, <build labels>) target replaces the six per-field targets.
  • The four storage stat panels and the Header Height column are folded into a single Node Storage & Height table. Each metric is its own format: table target grouped with sum by (service), then joined on service with an outer join so a node missing one metric still appears. Keeping sum scoped per service means each row matches what the old panels reported in aggregate.

3. Pagination for both tables

Panel height in Grafana is a fixed number of grid units and a table panel does not grow with its row count, so the per-node tables clipped their rows: three nodes left dead space under the table, and more nodes made the rows past the panel bottom unreachable.

Both tables now enable pagination and are sized for the production layout — each role runs three nodes, so a 7-unit panel shows exactly one full page of three rows with no wasted space. Selecting more services adds pages rather than hiding nodes: with 12 nodes the tables show 1-3 of 12 rows and four pages.

The flag is written in both places Grafana has used for it: options.footer.enablePagination (read by the table panel up to and including 12.1) and the top-level options.enablePagination (read from 12.2 on). Setting only the top-level key makes older deployments silently ignore it — the panel gets shorter but shows no pager, so rows stay unreachable.

Collapsed rows keep the same offsets from their row to their children as before.

Testing

  • jq empty passes on the dashboard JSON.
  • Panel ids stay unique (60 panels, no duplicates); the removed ids are 128–131 and 140, the new table is id 339.
  • Rendered against a live Grafana 12.2.1 + Prometheus with synthetic services named after the mainnet ones, at two node counts:
    • 3 nodes (production per-role size): both tables show all three rows in a single page with no dead space.
    • 12 nodes: both tables show 1-3 of 12 rows with four working pages, so no node is hidden.
    • Repeated on Grafana 12.1.0 and 12.2.1 — the pagination option moved between those releases, so both were checked explicitly.
  • The six PromQL expressions each return one series per service as expected.
  • No overlapping panels after the layout shift (checked programmatically); collapsed rows keep their original row-to-child offsets.
  • The RPC panel was not checked against a live Prometheus/Grafana.

Add an "RPC Requests (Per Minute) By Role" panel to the RPC row, mirroring the per-node request-volume view operators use for geth's rpc_requests. Existing panels are unchanged.

The panel sums reth_rpc_server_calls_started_total per service. Unlike requests_started_total or calls_successful_total, it counts every entry of a batch request and includes failed calls. reth only installs the RPC metrics layer on the HTTP/WS/IPC servers, so Engine API calls on the authenticated port are excluded.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Claude Code Review

Claude Code Review is paused for this repository because its GitHub organization is not linked to your Claude organization.

To turn it back on, one person needs both roles: owner of the GitHub organization (or the account owner, for a personal repository) and admin or owner of your Claude organization. If that is not you, pass this on to someone who is.

Open Organization settings, Git providers and click Link next to the GitHub organization's name. If it is not listed, click Enable GitHub integration or Connect your GitHub first, whichever the page shows.

New pull requests are then reviewed as before. To get a review on one that is already open, someone with write access can comment @claude review.

Tip: disable this comment in your organization's Code Review settings.

@coderabbitai

coderabbitai Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 8ed802d2-6dba-42ae-85db-82aa1bdd1fee
Commits

Reviewing files that changed from the base of the PR and between f70cbed and 2686c39.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review

No actionable comments were generated in the recent review.

Walkthrough

The Grafana dashboard adds a panel that plots JSON-RPC calls per minute by service. Its description lists included HTTP, WS, and IPC calls, and excludes authenticated-port Engine API calls.

Changes: RPC dashboard

Layer / File(s) Summary
RPC call-rate panel
etc/grafana/dashboards/morph-reth.json
Adds a timeseries panel using reth_rpc_server_calls_started_total, filtered by chain, role, and service. It displays the rate per minute, grouped by service. The description identifies included and excluded calls.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Feature

Merge Risk: Minimal · previous review a2308

The new RPC request-rate panel is mergeable after normal checks; the suspected aggregation issue is not supported by the configured metrics source.

Pre-merge checks: Passed 3 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Title check Warning The title correctly identifies the RPC requests panel, but it also claims that per-node Overview tables were added. The changeset contains no Overview table changes. Remove the unsupported Overview tables claim. For example: "feat(metrics): add RPC requests per minute panel".
Passed Passed checks: 3 passed

Check name Status Explanation
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Finishing Touches

🧪 Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
Fix failing CI checks

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

ℹ️ Recent review info

⚙️ Run configuration

  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 09a7c694-16db-43c2-b681-f1f0534e867e
📥 Commits

Reviewing files that changed from the base of the PR and between bad4612 and a230887.

📒 Files selected for processing: 1

  • etc/grafana/dashboards/morph-reth.json

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

With more than one service selected the Overview panels became unreadable:
Build Info rendered every node's values side by side in a single stat row so
they overlapped, and Database / Freelist / Static Files / Total each summed
over all services, leaving one number with no way to tell which node it came
from.

Render both as tables with one row per node instead:

- Build Info is now a table keyed by `service`, one row per node with its
  version, git SHA, build time, profile, target and features.
- The four storage stat panels and the 3-wide Header Height column are folded
  into a single "Node Storage & Height" table. Each metric is a separate
  `format: table` target grouped with `sum by (service)`, then joined on
  `service` with an outer join so a node missing one metric still shows up.
  The global `sum()` is kept per service, so each row matches what the old
  panels reported in aggregate.

Panels below the Overview row shift down by 5 grid units to make room; the
collapsed rows keep their relative offsets to their children.

Verified by rendering the dashboard in a local Grafana 12.2.1 against a
Prometheus scraping five synthetic services: all five nodes appear as distinct
rows in both tables and every value is attributable.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Claude Code Review

Claude Code Review is paused for this repository because its GitHub organization is not linked to your Claude organization.

To turn it back on, one person needs both roles: owner of the GitHub organization (or the account owner, for a personal repository) and admin or owner of your Claude organization. If that is not you, pass this on to someone who is.

Open Organization settings, Git providers and click Link next to the GitHub organization's name. If it is not listed, click Enable GitHub integration or Connect your GitHub first, whichever the page shows.

New pull requests are then reviewed as before. To get a review on one that is already open, someone with write access can comment @claude review.

Tip: disable this comment in your organization's Code Review settings.

@panos-xyz panos-xyz changed the title feat(metrics): add RPC requests per minute panel to Grafana dashboard feat(metrics): add RPC requests panel and per-node Overview tables Oct 29, 2026
Grafana lays panels out in fixed grid units and a table panel does not grow
with its row count, so the per-node tables clipped their rows: with three
nodes there was dead space under the table, and with more nodes the rows past
the panel bottom were unreachable.

Enable pagination on both tables and size them for the production layout.
Each role runs three nodes, so a 7-unit panel shows exactly one full page of
three rows with no wasted space; selecting more services adds pages instead of
hiding nodes.

Panels below the Overview row shift up by 2 grid units accordingly.
Grafana moved the table pagination flag: before 12.2 the table panel reads
`options.footer.enablePagination`, from 12.2 on it reads a top-level
`options.enablePagination` (grafana/grafana TablePanel.tsx at v12.1.0 vs
v12.2.0). Only the top-level key was set, so on older deployments the flag
was silently ignored and rows past the panel bottom stayed unreachable —
the panel was shorter but showed no pager.

Set both keys so the tables paginate on either version. Verified by
rendering in Grafana 12.1.0 and 12.2.1: both now show `1-3 of 12 rows`
with four working pages.
@panos-xyz
panos-xyz requested a review from dylanCai9 November 9, 2026 13:41

@curryxbo curryxbo left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Claude Code Review

Claude Code Review is paused for this repository because its GitHub organization is not linked to your Claude organization.

To turn it back on, one person needs both roles: owner of the GitHub organization (or the account owner, for a personal repository) and admin or owner of your Claude organization. If that is not you, pass this on to someone who is.

Open Organization settings, Git providers and click Link next to the GitHub organization's name. If it is not listed, click Enable GitHub integration or Connect your GitHub first, whichever the page shows.

New pull requests are then reviewed as before. To get a review on one that is already open, someone with write access can comment @claude review.

Tip: disable this comment in your organization's Code Review settings.

@panos-xyz
panos-xyz merged commit bd997d8 into main Nov 11, 2026
12 checks passed
@panos-xyz
panos-xyz deleted the feat/grafana-rpc-requests-panel branch November 11, 2026 03:33
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