-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Description
Problem
RPC metrics in crates/rpc/src/metrics.rs use expect() during lazy static initialization, which will panic if metric registration fails.
Details
static ref RPC_REQUESTS_TOTAL: IntCounterVec = IntCounterVec::new(...)
.expect("Failed to register rpc_requests_total metric")All metric registrations follow this pattern:
RPC_REQUESTS_TOTALRPC_REQUEST_DURATIONRPC_ACTIVE_CONNECTIONSRPC_WS_SUBSCRIPTIONSRPC_RATE_LIMIT_REJECTIONS
Impact
- If Prometheus registry has naming conflicts or is exhausted, node crashes at startup
- No graceful degradation to running without metrics