metrics

package
v1.0.0-helm Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 25, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

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".

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL