metric

package
v2.11.0 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2022 License: GPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRegistry

func GetRegistry() metrics.Registry

func InitCollectors

func InitCollectors(newMetricConfig structure.MetricConfiguration,
	oldMetricConfig structure.MetricConfiguration) metrics.Registry

func InitGCMetrics

func InitGCMetrics(duration time.Duration)

func InitHealhcheck

func InitHealhcheck(name string, checker func(h metrics.Healthcheck))

func InitHttpServer

func InitHttpServer(metricConfig structure.MetricConfiguration)

func InitMemoryMetrics

func InitMemoryMetrics(duration time.Duration)

func InitProfiling added in v2.3.0

func InitProfiling(service string)

func InitStatusChecker

func InitStatusChecker(name string, checker func() interface{})

func RemoveAllStatusChecker

func RemoveAllStatusChecker()

func RemoveStatusChecker

func RemoveStatusChecker(name string)

func WithMetrics

func WithMetrics(metrics *MethodMetrics, next backend.Interceptor) backend.Interceptor

Types

type MethodMetrics

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

func NewMethodMetrics

func NewMethodMetrics(metricsPrefix string, registry metrics.Registry) *MethodMetrics

func (*MethodMetrics) CatchMetric

func (mm *MethodMetrics) CatchMetric(method string, dur time.Duration, err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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