prometheusvanilla

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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, 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, 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 added in v1.0.0

func BuildHistogram(name, help, namespace string, labelNames []string, 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 added in v0.2.0

func BuildSummary(name, help, namespace string, labelNames []string, 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.

Jump to

Keyboard shortcuts

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