Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RPCCollector ¶
type RPCCollector struct {
// contains filtered or unexported fields
}
func NewRPCCollector ¶
func NewRPCCollector(l *log.PrefixLogger) *RPCCollector
NewRPCCollector constructs a metrics collector dedicated to RPC latency. It exposes a fixed set of per-operation histograms (<op>_duration_seconds) labeled by result=("success"|"error"). The returned collector provides Observe(operation, seconds, err) to plug directly into the agent’s RPC timing callback.
func (*RPCCollector) Collect ¶
func (c *RPCCollector) Collect(ch chan<- prometheus.Metric)
func (*RPCCollector) Describe ¶
func (c *RPCCollector) Describe(ch chan<- *prometheus.Desc)
func (*RPCCollector) Observe ¶
func (c *RPCCollector) Observe(operation string, seconds float64, err error)
Observe is the drop-in hook for the agent’s RPC timing callback. It matches the callback signature (operation, seconds, err) and records latency under <operation>_duration_seconds with result="success|error".
Click to show internal directories.
Click to hide internal directories.