Versions in this module Expand all Collapse all v0 v0.9.0-pre1 Aug 31, 2017 v0.8.0 Aug 17, 2016 Changes in this version + const DefAgeBuckets + const DefBufCap + const DefMaxAge + var DefBuckets = []float64 + var DefObjectives = map[float64]float64 + var DefaultGatherer Gatherer = defaultRegistry + var DefaultRegisterer Registerer = defaultRegistry + func BuildFQName(namespace, subsystem, name string) string + func ExponentialBuckets(start, factor float64, count int) []float64 + func Handler() http.Handler + func InstrumentHandler(handlerName string, handler http.Handler) http.HandlerFunc + func InstrumentHandlerFunc(handlerName string, handlerFunc func(http.ResponseWriter, *http.Request)) http.HandlerFunc + func InstrumentHandlerFuncWithOpts(opts SummaryOpts, handlerFunc func(http.ResponseWriter, *http.Request)) http.HandlerFunc + func InstrumentHandlerWithOpts(opts SummaryOpts, handler http.Handler) http.HandlerFunc + func LinearBuckets(start, width float64, count int) []float64 + func MustRegister(cs ...Collector) + func Register(c Collector) error + func SetMetricFamilyInjectionHook(hook func() []*dto.MetricFamily) + func UninstrumentedHandler() http.Handler + func Unregister(c Collector) bool + type AlreadyRegisteredError struct + ExistingCollector Collector + NewCollector Collector + func (err AlreadyRegisteredError) Error() string + type Collector interface + Collect func(chan<- Metric) + Describe func(chan<- *Desc) + func MustRegisterOrGet(c Collector) Collector + func NewExpvarCollector(exports map[string]*Desc) Collector + func NewGoCollector() Collector + func NewProcessCollector(pid int, namespace string) Collector + func NewProcessCollectorPIDFn(pidFn func() (int, error), namespace string) Collector + func RegisterOrGet(c Collector) (Collector, error) + type Counter interface + Add func(float64) + Inc func() + Set func(float64) + func NewCounter(opts CounterOpts) Counter + type CounterFunc interface + func NewCounterFunc(opts CounterOpts, function func() float64) CounterFunc + type CounterOpts Opts + type CounterVec struct + func NewCounterVec(opts CounterOpts, labelNames []string) *CounterVec + func (m *CounterVec) GetMetricWith(labels Labels) (Counter, error) + func (m *CounterVec) GetMetricWithLabelValues(lvs ...string) (Counter, error) + func (m *CounterVec) With(labels Labels) Counter + func (m *CounterVec) WithLabelValues(lvs ...string) Counter + type Desc struct + func NewDesc(fqName, help string, variableLabels []string, constLabels Labels) *Desc + func NewInvalidDesc(err error) *Desc + func (d *Desc) String() string + type Gatherer interface + Gather func() ([]*dto.MetricFamily, error) + type GathererFunc func() ([]*dto.MetricFamily, error) + func (gf GathererFunc) Gather() ([]*dto.MetricFamily, error) + type Gatherers []Gatherer + func (gs Gatherers) Gather() ([]*dto.MetricFamily, error) + type Gauge interface + Add func(float64) + Dec func() + Inc func() + Set func(float64) + Sub func(float64) + func NewGauge(opts GaugeOpts) Gauge + type GaugeFunc interface + func NewGaugeFunc(opts GaugeOpts, function func() float64) GaugeFunc + type GaugeOpts Opts + type GaugeVec struct + func NewGaugeVec(opts GaugeOpts, labelNames []string) *GaugeVec + func (m *GaugeVec) GetMetricWith(labels Labels) (Gauge, error) + func (m *GaugeVec) GetMetricWithLabelValues(lvs ...string) (Gauge, error) + func (m *GaugeVec) With(labels Labels) Gauge + func (m *GaugeVec) WithLabelValues(lvs ...string) Gauge + type Histogram interface + Observe func(float64) + func NewHistogram(opts HistogramOpts) Histogram + type HistogramOpts struct + Buckets []float64 + ConstLabels Labels + Help string + Name string + Namespace string + Subsystem string + type HistogramVec struct + func NewHistogramVec(opts HistogramOpts, labelNames []string) *HistogramVec + func (m *HistogramVec) GetMetricWith(labels Labels) (Histogram, error) + func (m *HistogramVec) GetMetricWithLabelValues(lvs ...string) (Histogram, error) + func (m *HistogramVec) With(labels Labels) Histogram + func (m *HistogramVec) WithLabelValues(lvs ...string) Histogram + type LabelPairSorter []*dto.LabelPair + func (s LabelPairSorter) Len() int + func (s LabelPairSorter) Less(i, j int) bool + func (s LabelPairSorter) Swap(i, j int) + type Labels map[string]string + type Metric interface + Desc func() *Desc + Write func(*dto.Metric) error + func MustNewConstHistogram(desc *Desc, count uint64, sum float64, buckets map[float64]uint64, ...) Metric + func MustNewConstMetric(desc *Desc, valueType ValueType, value float64, labelValues ...string) Metric + func MustNewConstSummary(desc *Desc, count uint64, sum float64, quantiles map[float64]float64, ...) Metric + func NewConstHistogram(desc *Desc, count uint64, sum float64, buckets map[float64]uint64, ...) (Metric, error) + func NewConstMetric(desc *Desc, valueType ValueType, value float64, labelValues ...string) (Metric, error) + func NewConstSummary(desc *Desc, count uint64, sum float64, quantiles map[float64]float64, ...) (Metric, error) + func NewInvalidMetric(desc *Desc, err error) Metric + type MetricVec struct + func (m *MetricVec) Collect(ch chan<- Metric) + func (m *MetricVec) Delete(labels Labels) bool + func (m *MetricVec) DeleteLabelValues(lvs ...string) bool + func (m *MetricVec) Describe(ch chan<- *Desc) + func (m *MetricVec) GetMetricWith(labels Labels) (Metric, error) + func (m *MetricVec) GetMetricWithLabelValues(lvs ...string) (Metric, error) + func (m *MetricVec) Reset() + func (m *MetricVec) With(labels Labels) Metric + func (m *MetricVec) WithLabelValues(lvs ...string) Metric + type MultiError []error + func (errs MultiError) Error() string + func (errs MultiError) MaybeUnwrap() error + type Opts struct + ConstLabels Labels + Help string + Name string + Namespace string + Subsystem string + type Registerer interface + MustRegister func(...Collector) + Register func(Collector) error + Unregister func(Collector) bool + type Registry struct + func NewPedanticRegistry() *Registry + func NewRegistry() *Registry + func (r *Registry) Gather() ([]*dto.MetricFamily, error) + func (r *Registry) MustRegister(cs ...Collector) + func (r *Registry) Register(c Collector) error + func (r *Registry) Unregister(c Collector) bool + type Summary interface + Observe func(float64) + func NewSummary(opts SummaryOpts) Summary + type SummaryOpts struct + AgeBuckets uint32 + BufCap uint32 + ConstLabels Labels + Help string + MaxAge time.Duration + Name string + Namespace string + Objectives map[float64]float64 + Subsystem string + type SummaryVec struct + func NewSummaryVec(opts SummaryOpts, labelNames []string) *SummaryVec + func (m *SummaryVec) GetMetricWith(labels Labels) (Summary, error) + func (m *SummaryVec) GetMetricWithLabelValues(lvs ...string) (Summary, error) + func (m *SummaryVec) With(labels Labels) Summary + func (m *SummaryVec) WithLabelValues(lvs ...string) Summary + type Untyped interface + Add func(float64) + Dec func() + Inc func() + Set func(float64) + Sub func(float64) + func NewUntyped(opts UntypedOpts) Untyped + type UntypedFunc interface + func NewUntypedFunc(opts UntypedOpts, function func() float64) UntypedFunc + type UntypedOpts Opts + type UntypedVec struct + func NewUntypedVec(opts UntypedOpts, labelNames []string) *UntypedVec + func (m *UntypedVec) GetMetricWith(labels Labels) (Untyped, error) + func (m *UntypedVec) GetMetricWithLabelValues(lvs ...string) (Untyped, error) + func (m *UntypedVec) With(labels Labels) Untyped + func (m *UntypedVec) WithLabelValues(lvs ...string) Untyped + type ValueType int + const CounterValue + const GaugeValue + const UntypedValue