Documentation ¶
Index ¶
- func Counter(name string) (counter prometheus.Counter, exist bool)
- func CounterAdd(name string, value float64)
- func CounterInc(name string)
- func CounterVec(name string) (counterVec *prometheus.CounterVec, exist bool)
- func CounterVecAdd(name string, label string, value float64)
- func CounterVecInc(name string, label string)
- func Gauge(name string) (gauge prometheus.Gauge, exist bool)
- func GaugeSet(name string, value float64)
- func Handler() http.Handler
- func Histogram(name string) (histogram prometheus.Histogram, exist bool)
- func HistogramObserve(name string, value float64)
- func Init()
- func RegisterCounterVecs(opts ...CounterVecOpts)
- func RegisterCounters(opts ...prometheus.CounterOpts)
- func RegisterGauges(opts ...prometheus.GaugeOpts)
- func RegisterHistograms(opts ...prometheus.HistogramOpts)
- func RegisterSummaries(opts ...prometheus.SummaryOpts)
- func Summary(name string) (summary prometheus.Summary, exist bool)
- func UnregisterCounterVecs(names ...string)
- func UnregisterCounters(names ...string)
- func UnregisterGauges(names ...string)
- func UnregisterHistogram(names ...string)
- func UnregisterSummaries(names ...string)
- type Config
- type CounterVecOpts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Counter ¶
func Counter(name string) (counter prometheus.Counter, exist bool)
Counter retrieves counter metric by name
func CounterAdd ¶
CounterAdd increments the counter with the given name.
func CounterInc ¶
func CounterInc(name string)
CounterInc increments the counter with the given name.
func CounterVec ¶
func CounterVec(name string) (counterVec *prometheus.CounterVec, exist bool)
CounterVec retrieves counter ver metric by name
func CounterVecAdd ¶
CounterVecAdd increments the counter vec by the given value, with the given name and label.
func CounterVecInc ¶
CounterVecInc increments the counter vec with the given name and label.
func Gauge ¶
func Gauge(name string) (gauge prometheus.Gauge, exist bool)
Gauge retrieves gauge metric by name
func Histogram ¶
func Histogram(name string) (histogram prometheus.Histogram, exist bool)
Histogram retrieves histogram metric by name
func HistogramObserve ¶
HistogramObserve observes the histogram from the given start time.
func RegisterCounterVecs ¶
func RegisterCounterVecs(opts ...CounterVecOpts)
RegisterCounterVecs registers the provided counter vec metrics to the Prometheus registerer.
func RegisterCounters ¶
func RegisterCounters(opts ...prometheus.CounterOpts)
RegisterCounters registers the provided counter metrics to the Prometheus registerer.
func RegisterGauges ¶
func RegisterGauges(opts ...prometheus.GaugeOpts)
RegisterGauges registers the provided gauge metrics to the Prometheus registerer.
func RegisterHistograms ¶
func RegisterHistograms(opts ...prometheus.HistogramOpts)
RegisterHistograms registers the provided histogram metrics to the Prometheus registerer.
func RegisterSummaries ¶
func RegisterSummaries(opts ...prometheus.SummaryOpts)
RegisterSummaries registers the provided summary metrics to the Prometheus registerer.
func Summary ¶
func Summary(name string) (summary prometheus.Summary, exist bool)
Summary retrieves summary metric by name
func UnregisterCounterVecs ¶
func UnregisterCounterVecs(names ...string)
UnregisterCounterVecs unregisters the provided counter vec metrics from the Prometheus registerer.
func UnregisterCounters ¶
func UnregisterCounters(names ...string)
UnregisterCounters unregisters the provided counter metrics from the Prometheus registerer.
func UnregisterGauges ¶
func UnregisterGauges(names ...string)
UnregisterGauges unregisters the provided gauge metrics from the Prometheus registerer.
func UnregisterHistogram ¶
func UnregisterHistogram(names ...string)
UnregisterHistogram unregisters the provided histogram metrics from the Prometheus registerer.
func UnregisterSummaries ¶
func UnregisterSummaries(names ...string)
UnregisterSummaries unregisters the provided summary metrics from the Prometheus registerer.
Types ¶
type Config ¶
type Config struct { Host string `mapstructure:"Host"` Port int `mapstructure:"Port"` Enabled bool `mapstructure:"Enabled"` }
Config represents the configuration of the metrics
type CounterVecOpts ¶
type CounterVecOpts struct { prometheus.CounterOpts Labels []string }
CounterVecOpts holds options for the CounterVec type.