Documentation ¶
Overview ¶
Package metric provides functions to initialize the controller specific collectors and hooks to measure metrics and update the relevant collectors.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitializeApiCollectors ¶
func InitializeApiCollectors(r prometheus.Registerer)
InitializeApiCollectors registers the api collectors to the default prometheus register and initializes them to 0 for all possible label combinations.
func InitializeClusterCollectors ¶
func InitializeClusterCollectors(r prometheus.Registerer, server *grpc.Server)
InitializeClusterCollectors registers the cluster metrics to the default prometheus register and initializes them to 0 for all possible label combinations.
func InstrumentApiHandler ¶
InstrumentApiHandler provides a handler which measures api 1. The response size 2. The request size 3. The request latency and attaches status code, method, and path labels for each of these measurements.
func InstrumentClusterStatsHandler ¶
func InstrumentClusterStatsHandler() statsHandler
InstrumentClusterStatsHandler returns a gRPC stats.Handler which observes cluster specific metrics. Use with the cluster gRPC server.
Types ¶
This section is empty.