Documentation
¶
Index ¶
- Variables
- func BuildCounter(name, help, namespace string, labelNames []string, ...) (func(prometheus.Labels) interface{}, prometheus.Collector, error)
- func BuildGauge(name, help, namespace string, labelNames []string, ...) (func(prometheus.Labels) interface{}, prometheus.Collector, error)
- func BuildHistogram(name, help, namespace string, labelNames []string, ...) (func(prometheus.Labels) interface{}, prometheus.Collector, error)
- func BuildSummary(name, help, namespace string, labelNames []string, ...) (func(prometheus.Labels) interface{}, prometheus.Collector, error)
Constants ¶
This section is empty.
Variables ¶
var ( // HistogramType is the type of prometheus.Histogram interface HistogramType = reflect.TypeOf((*prometheus.Histogram)(nil)).Elem() // CounterType is the type of prometheus.Counter interface CounterType = reflect.TypeOf((*prometheus.Counter)(nil)).Elem() // GaugeType is the type of prometheus.Gauge interface GaugeType = reflect.TypeOf((*prometheus.Gauge)(nil)).Elem() // SummaryType is the type of prometheus.Summary interface SummaryType = reflect.TypeOf((*prometheus.Summary)(nil)).Elem() )
Functions ¶
func BuildCounter ¶
func BuildCounter(name, help, namespace string, labelNames []string, constLabels prometheus.Labels, tag reflect.StructTag) (func(prometheus.Labels) interface{}, prometheus.Collector, error)
BuildCounter builds a prometheus.Counter in the given prometheus.Registerer The function it returns returns a prometheus.Counter type as an interface{}
func BuildGauge ¶
func BuildGauge(name, help, namespace string, labelNames []string, constLabels prometheus.Labels, tag reflect.StructTag) (func(prometheus.Labels) interface{}, prometheus.Collector, error)
BuildGauge builds a prometheus.Gauge in the given prometheus.Registerer The function it returns returns a prometheus.Gauge type as an interface{}
func BuildHistogram ¶
func BuildHistogram(name, help, namespace string, labelNames []string, constLabels prometheus.Labels, tag reflect.StructTag) (func(prometheus.Labels) interface{}, prometheus.Collector, error)
BuildHistogram builds a prometheus.Histogram The function it returns returns a prometheus.Histogram type as an interface{} It requires the buckets tag to be provided If the buckets tag is explicitly empty, then the Histogram will be built with default prometheus buckets which is prometheus.DefBuckets at the time this comment is written.
func BuildSummary ¶
func BuildSummary(name, help, namespace string, labelNames []string, constLabels prometheus.Labels, tag reflect.StructTag) (func(prometheus.Labels) interface{}, prometheus.Collector, error)
BuildSummary builds a prometheus.Summary The function it returns returns a prometheus.Summary type as an interface{} It requires the objectives tag to be provided, and optionally the max_age tag If the objectives tag is explicitly empty, then the Summary will be built with default prometheus objectives which is no objectives at the time this comment is written.
Types ¶
This section is empty.