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: 22 Imported by: 0

Documentation

Overview

Package metric provides functions to initialize the worker 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 InitializeClusterClientCollectors

func InitializeClusterClientCollectors(r prometheus.Registerer)

func InitializeHttpCollectors

func InitializeHttpCollectors(r prometheus.Registerer)

InitializeHttpCollectors registers the proxy collectors to the provided prometheus register and initializes them to 0 for the most likely label combinations.

func InitializeWebsocketCollectors

func InitializeWebsocketCollectors(r prometheus.Registerer)

InitializeWebsocketCollectors registers the websocket collectors onto `r`. It panics upon the first registration that causes an error.

func InstrumentClusterClient

func InstrumentClusterClient() grpc.UnaryClientInterceptor

InstrumentClusterClient wraps a UnaryClientInterceptor and records observations for the collectors associated with gRPC connections between the cluster and its clients.

func InstrumentHttpHandler

func InstrumentHttpHandler(wrapped http.Handler) http.Handler

InstrumentHttpHandler provides a handler which measures time until header is written by the server and attaches status code, method, and path labels for the relevant measurements.

func InstrumentWebsocketWrapper

func InstrumentWebsocketWrapper(next http.Handler) http.Handler

InstrumentWebsocketWrapper expects an http.Handler where websockets are used and wraps it to instrument that websocket with metrics (bytes received, sent, etc).

Types

This section is empty.

Jump to

Keyboard shortcuts

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