metrics

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Metrics

type Metrics struct {
	// contains filtered or unexported fields
}

Metrics wraps the prometheus metrics gathering and serving.

It exposes gRPC and Go Runtime metrics.

func New

func New(logger log.Logger, addr string) *Metrics

func (*Metrics) InitializeMetrics

func (s *Metrics) InitializeMetrics(server *grpc.Server)

InitializeMetrics initializes all metrics, with their appropriate null value, for all gRPC methods registered on a gRPC server. This is useful, to ensure that all metrics exist when collecting and querying.

func (*Metrics) Registry added in v1.6.0

func (s *Metrics) Registry() *prometheus.Registry

func (*Metrics) Serve

func (s *Metrics) Serve()

func (*Metrics) UnaryServerInterceptor

func (s *Metrics) UnaryServerInterceptor() grpc.UnaryServerInterceptor

UnaryServerInterceptor returns an UnaryServerInterceptor that must be installed on the grpc.Server to gather metrics.

Jump to

Keyboard shortcuts

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