Skip to content

DF-23700 harmonize rpc client metrics#465

Open
vlfig wants to merge 1 commit intodevelopfrom
harmonize-rpcclient-metrics
Open

DF-23700 harmonize rpc client metrics#465
vlfig wants to merge 1 commit intodevelopfrom
harmonize-rpcclient-metrics

Conversation

@vlfig
Copy link
Copy Markdown
Contributor

@vlfig vlfig commented May 8, 2026

Pass the rpc domain to RPCClientBase, not the url, for consistency.

Bump chainlink-framework/metrics. Brings better labels and sanitization (smartcontractkit/chainlink-framework#106)

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

📊 API Diff Results

No changes detected for module github.com/smartcontractkit/chainlink-evm

View full report

@vlfig vlfig force-pushed the harmonize-rpcclient-metrics branch from 3f25414 to 5677022 Compare May 8, 2026 16:11
pass the rpc domain to RPCClientBase, not the url
bump cl-framework (brings better labels and sanitization)
@vlfig vlfig force-pushed the harmonize-rpcclient-metrics branch from 5677022 to 03fac52 Compare May 8, 2026 16:12
@vlfig vlfig marked this pull request as ready for review May 8, 2026 16:16
Copilot AI review requested due to automatic review settings May 8, 2026 16:16
@vlfig vlfig requested review from a team as code owners May 8, 2026 16:16
@vlfig vlfig enabled auto-merge (squash) May 8, 2026 16:18
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR harmonizes RPC client metrics by passing an RPC “domain” identifier (host) into multinode.RPCClientBase instead of a full URL, and bumps chainlink-framework/metrics to pick up improved labeling and sanitization.

Changes:

  • Update NewRPCClient to pass r.getRPCDomain() into multinode.NewRPCClientBase rather than a full RPC URL string.
  • Bump github.com/smartcontractkit/chainlink-framework/metrics to v0.0.0-20260508154216-3ed6f623098f.
  • Update go.sum accordingly.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.

File Description
pkg/client/rpc_client.go Passes RPC domain (host) into RPCClientBase for metrics consistency.
go.mod Bumps chainlink-framework/metrics dependency version.
go.sum Updates checksums for the bumped metrics dependency.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pkg/client/rpc_client.go
rpcBaseMetrics = r.beholderMetrics.rpcClientMetrics
}
r.RPCClientBase = multinode.NewRPCClientBase[*evmtypes.Head](cfg, QueryTimeout, lggr, r.latestBlock, r.latestFinalizedBlock, rpcURL, isSendOnly, rpcBaseMetrics)
r.RPCClientBase = multinode.NewRPCClientBase[*evmtypes.Head](cfg, QueryTimeout, lggr, r.latestBlock, r.latestFinalizedBlock, r.getRPCDomain(), isSendOnly, rpcBaseMetrics)
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The theoretical panic risk is already there and it's not happening in reality because we're always called with at least one of wsuri or httpuri non-nil.

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.

2 participants