Documentation ¶
Index ¶
- Constants
- Variables
- type Ctl
- func (mc *Ctl) RegisterCounter(name, help string) prometheus.Counter
- func (mc *Ctl) RegisterCounterVec(name, help string, labels ...string) *prometheus.CounterVec
- func (mc *Ctl) RegisterGauge(name, help string) prometheus.Gauge
- func (mc *Ctl) RegisterGaugeVec(name, help string, labels ...string) *prometheus.GaugeVec
- func (mc *Ctl) RegisterHistogram(name, help string, buckets []float64) prometheus.Histogram
- func (mc *Ctl) RegisterHistogramVec(name, help string, buckets []float64, labels ...string) *prometheus.HistogramVec
- type HeldCounter
- type HeldCounterVec
- type HeldGauge
- type HeldGaugeVec
- type HeldHistogram
- type HeldHistogramVec
- type Holder
- func (h *Holder) AddCounterVec(counterVec *prometheus.CounterVec) HeldCounterVec
- func (h *Holder) AddGaugeVec(gaugeVec *prometheus.GaugeVec) HeldGaugeVec
- func (h *Holder) AddHistogramVec(histogramVec *prometheus.HistogramVec) HeldHistogramVec
- func (h *Holder) DeleteOldMetrics()
- func (h *Holder) Maintenance()
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 (*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
}
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
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()
Click to show internal directories.
Click to hide internal directories.