metric

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: May 16, 2022 License: MPL-2.0 Imports: 21 Imported by: 0

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

func InstrumentApiHandler(wrapped http.Handler) http.Handler

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.

Jump to

Keyboard shortcuts

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