metrics

package
v0.0.187 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Counter

type Counter interface {
	Inc()
}

type CounterOpts

type CounterOpts struct {
	Opts
}

type CounterVec

type CounterVec interface {
	WithLabelValues(lvs ...string) Counter
}

type Gauge

type Gauge interface {
	Set(float64)
	Inc()
	Dec()
	Add(float64)
	Sub(float64)
	SetToCurrentTime()
}

type GaugeOpts

type GaugeOpts struct {
	Opts
}

type GaugeVec

type GaugeVec interface {
	WithLabelValues(lvs ...string) Gauge
}

type Histogram

type Histogram interface {
	Observe(float64)
}

type HistogramOpts

type HistogramOpts struct {
	Opts
	Buckets                         []float64
	NativeHistogramBucketFactor     float64
	NativeHistogramZeroThreshold    float64
	NativeHistogramMaxBucketNumber  uint32
	NativeHistogramMinResetDuration time.Duration
	NativeHistogramMaxZeroThreshold float64
	NativeHistogramMaxExemplars     int
	NativeHistogramExemplarTTL      time.Duration
}

type HistogramVec

type HistogramVec interface {
	WithLabelValues(lvs ...string) Histogram
}

type Labels

type Labels map[string]string

type Metrics

type Metrics interface {
	CounterVec(opts CounterOpts, labelNames []string) CounterVec
	Counter(opts CounterOpts) Counter
	SummaryVec(opts SummaryOpts, labelNames []string) SummaryVec
	Summary(opts SummaryOpts) Summary
	GaugeVec(opts GaugeOpts, labelNames []string) GaugeVec
	Gauge(opts GaugeOpts) Gauge
	HistogramVec(opts HistogramOpts, labelNames []string) HistogramVec
	Histogram(opts HistogramOpts) Histogram
}

type MetricsEngine

type MetricsEngine interface {
	Metrics() Metrics
	MetricsHandler() http.Handler
}

type Opts

type Opts struct {
	Namespace   string
	Subsystem   string
	Name        string
	Help        string
	ConstLabels Labels
}

type Summary

type Summary interface {
	Observe(float64)
}

type SummaryOpts

type SummaryOpts struct {
	Opts
	Objectives map[float64]float64
	MaxAge     time.Duration
	AgeBuckets uint32
	BufCap     uint32
}

type SummaryVec

type SummaryVec interface {
	WithLabelValues(lvs ...string) Summary
}

Jump to

Keyboard shortcuts

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