Skip to content

Comments

add beholder metrics for RPC call counts#365

Merged
poopoothegorilla merged 1 commit intodevelopfrom
beholder-rpc
Feb 20, 2026
Merged

add beholder metrics for RPC call counts#365
poopoothegorilla merged 1 commit intodevelopfrom
beholder-rpc

Conversation

@poopoothegorilla
Copy link
Contributor

@poopoothegorilla poopoothegorilla commented Feb 18, 2026

Summary

  • Adds beholder (OpenTelemetry) counters alongside existing Prometheus counters for RPC call tracking (total, success, failed) in the EVM RPC client.
  • Follows the dual-reporting pattern established in pkg/txmgr/metrics.go.
  • Counters include attributes: chainFamily, chainID, nodeName, rpcDomain, callName.

Resolves PLEX-2536

Changes

  • New: pkg/client/metrics.gorpcClientMetrics struct with beholder Int64Counters and increment methods
  • Modified: pkg/client/rpc_client.go — added beholderMetrics field to RPCClient, initialized in constructor; added ctx param to logResult and updated all 27 call sites
  • New: pkg/client/metrics_test.go — tests for counter creation and increment

Test plan

  • New unit tests pass (TestNewRPCClientMetrics, TestRPCClientMetrics_Increment)
  • Existing internal tests pass unchanged

@github-actions
Copy link
Contributor

👋 poopoothegorilla, thanks for creating this pull request!

To help reviewers, please consider creating future PRs as drafts first. This allows you to self-review and make any final changes before notifying the team.

Once you're ready, you can mark it as "Ready for review" to request feedback. Thanks!

@github-actions
Copy link
Contributor

✅ API Diff Results - No breaking changes


📄 View full apidiff report

@poopoothegorilla poopoothegorilla enabled auto-merge (squash) February 19, 2026 14:38
Comment on lines +19 to +20
func newRPCClientMetrics() (*rpcClientMetrics, error) {
callsTotal, err := beholder.GetMeter().Int64Counter("evm_pool_rpc_node_calls_total")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit/ if you inject this then it keeps things decoupled and testable

@poopoothegorilla poopoothegorilla merged commit 6bbe063 into develop Feb 20, 2026
33 checks passed
@poopoothegorilla poopoothegorilla deleted the beholder-rpc branch February 20, 2026 02:01
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.

4 participants