Skip to main content

Module rpc_tracing

Module rpc_tracing 

Source
Expand description

RPC tracing middleware for OpenTelemetry SERVER spans.

This middleware enables Jaeger Service Performance Monitoring (SPM) by marking JSON-RPC endpoints with SPAN_KIND_SERVER. SPM displays RED metrics (Rate, Errors, Duration) for server-side handlers.

§Background

Jaeger SPM filters for SPAN_KIND_SERVER spans by default. Without this middleware, all Zebra spans are SPAN_KIND_INTERNAL, making them invisible in SPM’s Monitor tab.

This follows OpenTelemetry best practices used by other blockchain clients:

  • Lighthouse (Ethereum consensus client)
  • Hyperledger Besu (Ethereum execution client)
  • Hyperledger Fabric

Structs§

RpcTracingMiddleware
Middleware that creates SERVER spans for each RPC request.