Skip to content

[metrics] Add RPC-latency series to charon-metrics exporter #302

@obchain

Description

@obchain

Tracking issue filed from PR #54 dashboard review (#283).

Scope

The Grafana dashboard (deploy/grafana/charon.json) omits an RPC-latency panel because backing series do not exist. Add:

  • charon_rpc_call_duration_seconds (histogram) — labeled by method (eth_call, eth_getBlockByNumber, eth_sendRawTransaction, eth_getLogs) and endpoint_kind (public, private)
  • charon_rpc_errors_total (counter) — labeled by method and error_kind (timeout, rejected, connection_lost)
  • charon_rpc_connection_reconnects_total (counter) — labeled by endpoint_kind

Emission sites: wherever an alloy Provider call crosses the network — scanner health reads, executor submit, simulation calls. A middleware or wrapper around the Provider is the cleanest integration point.

Acceptance

  • Histograms with sensible default buckets (1ms..30s)
  • All public RPC entry points emit duration + error classification
  • Dashboard panel added post-merge

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestlayer:rustRust crates (core / scanner / protocols / executor / cli)priority:p2-polishNice-to-have / polishstatus:readyScoped and ready to pick uptype:featureNew capability or deliverable

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions