metric

package
v0.76.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	PromNamespace = "file_d"
)

Variables

View Source
var (
	SecondsBucketsDetailedNano = prometheus.ExponentialBuckets(0.000005, 2.18, 17) // covers range from 5µs to 1.3s
	SecondsBucketsDetailed     = prometheus.ExponentialBuckets(0.0005, 2, 16)      // covers range from 500µs to 16.384s
	SecondsBucketsLong         = prometheus.ExponentialBuckets(0.005, 2, 16)       // covers range from 5000µs to 163.84s
)

Functions

This section is empty.

Types

type Counter added in v0.76.0

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

func (*Counter) Add added in v0.76.0

func (c *Counter) Add(v float64)

func (*Counter) Inc added in v0.76.0

func (c *Counter) Inc()

func (*Counter) ToFloat64 added in v0.76.0

func (c *Counter) ToFloat64() float64

should only be used in tests

type CounterVec added in v0.76.0

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

func (*CounterVec) DeleteLabelValues added in v0.76.0

func (cv *CounterVec) DeleteLabelValues(lvs ...string) bool

func (*CounterVec) DeleteOldMetrics added in v0.76.0

func (cv *CounterVec) DeleteOldMetrics(holdDuration time.Duration)

func (*CounterVec) WithLabelValues added in v0.76.0

func (cv *CounterVec) WithLabelValues(lvs ...string) *Counter

type Ctl added in v0.7.0

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

func NewCtl added in v0.20.0

func NewCtl(subsystem string, registry *prometheus.Registry, metricHoldDuration time.Duration) *Ctl

func (*Ctl) AddToHolder added in v0.76.0

func (mc *Ctl) AddToHolder(mv heldMetricVec)

func (*Ctl) Maintenance added in v0.76.0

func (mc *Ctl) Maintenance()

func (*Ctl) RegisterCounter added in v0.7.0

func (mc *Ctl) RegisterCounter(name, help string) *Counter

func (*Ctl) RegisterCounterVec added in v0.20.0

func (mc *Ctl) RegisterCounterVec(name, help string, labels ...string) *CounterVec

func (*Ctl) RegisterGauge added in v0.7.0

func (mc *Ctl) RegisterGauge(name, help string) *Gauge

func (*Ctl) RegisterGaugeVec added in v0.20.0

func (mc *Ctl) RegisterGaugeVec(name, help string, labels ...string) *GaugeVec

func (*Ctl) RegisterHistogram added in v0.9.3

func (mc *Ctl) RegisterHistogram(name, help string, buckets []float64) *Histogram

func (*Ctl) RegisterHistogramVec added in v0.20.0

func (mc *Ctl) RegisterHistogramVec(name, help string, buckets []float64, labels ...string) *HistogramVec

type Gauge added in v0.76.0

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

func (*Gauge) Add added in v0.76.0

func (g *Gauge) Add(v float64)

func (*Gauge) Dec added in v0.76.0

func (g *Gauge) Dec()

func (*Gauge) Inc added in v0.76.0

func (g *Gauge) Inc()

func (*Gauge) Set added in v0.76.0

func (g *Gauge) Set(v float64)

func (*Gauge) Sub added in v0.76.0

func (g *Gauge) Sub(v float64)

func (*Gauge) ToFloat64 added in v0.76.0

func (c *Gauge) ToFloat64() float64

should only be used in tests

type GaugeVec added in v0.76.0

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

func (*GaugeVec) DeleteLabelValues added in v0.76.0

func (cv *GaugeVec) DeleteLabelValues(lvs ...string) bool

func (*GaugeVec) DeleteOldMetrics added in v0.76.0

func (gv *GaugeVec) DeleteOldMetrics(holdDuration time.Duration)

func (*GaugeVec) WithLabelValues added in v0.76.0

func (gv *GaugeVec) WithLabelValues(lvs ...string) *Gauge

type Histogram added in v0.76.0

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

func (*Histogram) Observe added in v0.76.0

func (h *Histogram) Observe(v float64)

type HistogramVec added in v0.76.0

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

func (*HistogramVec) DeleteLabelValues added in v0.76.0

func (cv *HistogramVec) DeleteLabelValues(lvs ...string) bool

func (*HistogramVec) DeleteOldMetrics added in v0.76.0

func (hv *HistogramVec) DeleteOldMetrics(holdDuration time.Duration)

func (*HistogramVec) WithLabelValues added in v0.76.0

func (hv *HistogramVec) WithLabelValues(lvs ...string) *Histogram

type Holder added in v0.20.0

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

func NewHolder added in v0.20.0

func NewHolder(holdDuration time.Duration) *Holder

NewHolder returns new metric holder. The holdDuration must be more than 1m.

Jump to

Keyboard shortcuts

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