Documentation ¶
Overview ¶
Package prometheus provides a Prometheus-based implementation of the MetricFactory abstraction.
Index ¶
- type Counter
- type Gauge
- type Histogram
- type MetricFactory
- func (pmf MetricFactory) NewCounter(name, help string, labelNames ...string) monitoring.Counter
- func (pmf MetricFactory) NewGauge(name, help string, labelNames ...string) monitoring.Gauge
- func (pmf MetricFactory) NewHistogram(name, help string, labelNames ...string) monitoring.Histogram
- func (pmf MetricFactory) NewHistogramWithBuckets(name, help string, buckets []float64, labelNames ...string) monitoring.Histogram
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Counter ¶
type Counter struct {
// contains filtered or unexported fields
}
Counter is a wrapper around a Prometheus Counter or CounterVec object.
type Gauge ¶
type Gauge struct {
// contains filtered or unexported fields
}
Gauge is a wrapper around a Prometheus Gauge or GaugeVec object.
type Histogram ¶
type Histogram struct {
// contains filtered or unexported fields
}
Histogram is a wrapper around a Prometheus Histogram or HistogramVec object.
type MetricFactory ¶
type MetricFactory struct { // Prefix is an identifier that will be used before local metric names that // are reported. It is strongly recommended that this ends with a valid // separator (e.g. "_") in order to improve readability; no separator is // added by this library. Prefix string }
MetricFactory allows the creation of Prometheus-based metrics.
func (MetricFactory) NewCounter ¶
func (pmf MetricFactory) NewCounter(name, help string, labelNames ...string) monitoring.Counter
NewCounter creates a new Counter object backed by Prometheus.
func (MetricFactory) NewGauge ¶
func (pmf MetricFactory) NewGauge(name, help string, labelNames ...string) monitoring.Gauge
NewGauge creates a new Gauge object backed by Prometheus.
func (MetricFactory) NewHistogram ¶
func (pmf MetricFactory) NewHistogram(name, help string, labelNames ...string) monitoring.Histogram
NewHistogram creates a new Histogram object backed by Prometheus with the supplied buckets.
func (MetricFactory) NewHistogramWithBuckets ¶ added in v1.3.0
func (pmf MetricFactory) NewHistogramWithBuckets(name, help string, buckets []float64, labelNames ...string) monitoring.Histogram
NewHistogramWithBuckets creates a new Histogram object backed by Prometheus and using the supplied bucketing intervals. Note: the number of buckets should be kept within reasonable bounds.