Expand description
RPC metrics middleware for Prometheus metrics collection.
This middleware collects metrics for JSON-RPC requests, including:
- Request count by method and status
- Request duration by method
- Active request count
- Error count by method and error code
These metrics complement the OpenTelemetry tracing in rpc_tracing.rs,
providing aggregated data suitable for dashboards and alerting.
Structsยง
- RpcMetrics
Middleware - Middleware that collects Prometheus metrics for each RPC request.