metrics

package
v1.35.0 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2024 License: MIT Imports: 8 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultObjectives = map[float64]float64{
		0.5:  0.05,
		0.9:  0.01,
		0.95: 0.005,
		0.99: 0.001,
	}
)
View Source
var (
	DefaultRegistry = NewRegistry()
)

Functions

func GetOrRegister

func GetOrRegister[M Metric](registry *Registry, metric M) M

func Milliseconds

func Milliseconds(duration time.Duration) float64

Types

type Metric

type Metric interface {
	prometheus.Collector
}

type Registry

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

func NewRegistry

func NewRegistry() *Registry

func (*Registry) GetOrRegister

func (r *Registry) GetOrRegister(metric Metric) Metric

func (*Registry) MetricsDescriptionHandler

func (r *Registry) MetricsDescriptionHandler() http.Handler

func (*Registry) MetricsHandler

func (r *Registry) MetricsHandler() http.Handler

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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