metric

package
v0.38.2 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2024 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PromNamespace = "file_d"
)

Variables

View Source
var (
	SecondsBucketsDetailedNano = prometheus.ExponentialBuckets(0.000005, 2, 19) // covers range from 5ns to 1.3ms
	SecondsBucketsDetailed     = prometheus.ExponentialBuckets(0.0005, 2, 16)   // covers range from 500us to 16.384s
	SecondsBucketsLong         = prometheus.ExponentialBuckets(0.005, 2, 16)    // covers range from 5ms to 163.84s
)

Functions

This section is empty.

Types

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) *Ctl

func (*Ctl) RegisterCounter added in v0.7.0

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

func (*Ctl) RegisterCounterVec added in v0.20.0

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

func (*Ctl) RegisterGauge added in v0.7.0

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

func (*Ctl) RegisterGaugeVec added in v0.20.0

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

func (*Ctl) RegisterHistogram added in v0.9.3

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

func (*Ctl) RegisterHistogramVec added in v0.20.0

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

type HeldCounter added in v0.20.0

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

func (HeldCounter) Add added in v0.20.0

func (h HeldCounter) Add(v float64)

func (HeldCounter) Inc added in v0.20.0

func (h HeldCounter) Inc()

type HeldCounterVec added in v0.20.0

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

func NewHeldCounterVec added in v0.20.0

func NewHeldCounterVec(cv *prometheus.CounterVec) HeldCounterVec

func (HeldCounterVec) DeleteOldMetrics added in v0.20.0

func (h HeldCounterVec) DeleteOldMetrics(holdDuration time.Duration)

func (HeldCounterVec) WithLabelValues added in v0.20.0

func (h HeldCounterVec) WithLabelValues(lvs ...string) HeldCounter

type HeldGauge added in v0.20.0

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

func (HeldGauge) Add added in v0.20.0

func (h HeldGauge) Add(v float64)

func (HeldGauge) Dec added in v0.20.0

func (h HeldGauge) Dec()

func (HeldGauge) Inc added in v0.20.0

func (h HeldGauge) Inc()

func (HeldGauge) Set added in v0.20.0

func (h HeldGauge) Set(v float64)

func (HeldGauge) Sub added in v0.20.0

func (h HeldGauge) Sub(v float64)

type HeldGaugeVec added in v0.20.0

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

func NewHeldGaugeVec added in v0.20.0

func NewHeldGaugeVec(gv *prometheus.GaugeVec) HeldGaugeVec

func (HeldGaugeVec) DeleteOldMetrics added in v0.20.0

func (h HeldGaugeVec) DeleteOldMetrics(holdDuration time.Duration)

func (HeldGaugeVec) WithLabelValues added in v0.20.0

func (h HeldGaugeVec) WithLabelValues(lvs ...string) HeldGauge

type HeldHistogram added in v0.20.0

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

func (HeldHistogram) Observe added in v0.20.0

func (h HeldHistogram) Observe(v float64)

type HeldHistogramVec added in v0.20.0

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

func NewHeldHistogramVec added in v0.20.0

func NewHeldHistogramVec(hv *prometheus.HistogramVec) HeldHistogramVec

func (HeldHistogramVec) DeleteOldMetrics added in v0.20.0

func (h HeldHistogramVec) DeleteOldMetrics(holdDuration time.Duration)

func (HeldHistogramVec) WithLabelValues added in v0.20.0

func (h HeldHistogramVec) WithLabelValues(lvs ...string) HeldHistogram

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.

func (*Holder) AddCounterVec added in v0.20.0

func (h *Holder) AddCounterVec(counterVec *prometheus.CounterVec) HeldCounterVec

func (*Holder) AddGaugeVec added in v0.20.0

func (h *Holder) AddGaugeVec(gaugeVec *prometheus.GaugeVec) HeldGaugeVec

func (*Holder) AddHistogramVec added in v0.20.0

func (h *Holder) AddHistogramVec(histogramVec *prometheus.HistogramVec) HeldHistogramVec

func (*Holder) DeleteOldMetrics added in v0.20.0

func (h *Holder) DeleteOldMetrics()

DeleteOldMetrics delete old metric labels, that aren't in use since last update.

func (*Holder) Maintenance added in v0.20.0

func (h *Holder) Maintenance()

Jump to

Keyboard shortcuts

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