Skip to content

Commit 03fac52

Browse files
committed
DF-23700 harmonize rpc client metrics
pass the rpc domain to RPCClientBase, not the url bump cl-framework (brings better labels and sanitization)
1 parent ddc68a5 commit 03fac52

3 files changed

Lines changed: 4 additions & 10 deletions

File tree

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ require (
3131
github.com/smartcontractkit/chainlink-evm/gethwrappers v0.0.0-20251022073203-7d8ae8cf67c1
3232
github.com/smartcontractkit/chainlink-framework/capabilities v0.0.0-20260423135514-5b1a7565a99c
3333
github.com/smartcontractkit/chainlink-framework/chains v0.0.0-20260423135514-5b1a7565a99c
34-
github.com/smartcontractkit/chainlink-framework/metrics v0.0.0-20260423135514-5b1a7565a99c
34+
github.com/smartcontractkit/chainlink-framework/metrics v0.0.0-20260508154216-3ed6f623098f
3535
github.com/smartcontractkit/chainlink-framework/multinode v0.0.0-20260505202410-b350dca113b4
3636
github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20260326111235-8c09d1a4491f
3737
github.com/smartcontractkit/chainlink-protos/svr v1.2.0

go.sum

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/client/rpc_client.go

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -180,18 +180,12 @@ func NewRPCClient(
180180
lggr.Error("RPC client is configured with only WebSocket URL. If this CL Node serves external requests, it must also have an HTTP URL configured. Otherwise, there is a serious DDoS risk.")
181181
}
182182

183-
var rpcURL string
184-
if wsuri != nil {
185-
rpcURL = wsuri.String()
186-
} else if httpuri != nil {
187-
rpcURL = httpuri.String()
188-
}
189183
isSendOnly := tier == multinode.Secondary
190184
var rpcBaseMetrics frameworkmetrics.RPCClientMetrics
191185
if r.beholderMetrics != nil {
192186
rpcBaseMetrics = r.beholderMetrics.rpcClientMetrics
193187
}
194-
r.RPCClientBase = multinode.NewRPCClientBase[*evmtypes.Head](cfg, QueryTimeout, lggr, r.latestBlock, r.latestFinalizedBlock, rpcURL, isSendOnly, rpcBaseMetrics)
188+
r.RPCClientBase = multinode.NewRPCClientBase[*evmtypes.Head](cfg, QueryTimeout, lggr, r.latestBlock, r.latestFinalizedBlock, r.getRPCDomain(), isSendOnly, rpcBaseMetrics)
195189
return r
196190
}
197191

0 commit comments

Comments
 (0)