prometheus

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2016 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package prometheus implements a Prometheus backend for package metrics.

Index

Constants

This section is empty.

Variables

View Source
var PrometheusLabelValueUnknown = "unknown"

Prometheus has strong opinions about the dimensionality of fields. Users must predeclare every field key they intend to use. On every observation, fields with keys that haven't been predeclared will be silently dropped, and predeclared field keys without values will receive the value PrometheusLabelValueUnknown.

Functions

func NewCounter

func NewCounter(opts prometheus.CounterOpts, fieldKeys []string) metrics.Counter

NewCounter returns a new Counter backed by a Prometheus metric. The counter is automatically registered via prometheus.Register.

func NewGauge

func NewGauge(opts prometheus.GaugeOpts, fieldKeys []string) metrics.Gauge

NewGauge returns a new Gauge backed by a Prometheus metric. The gauge is automatically registered via prometheus.Register.

func NewHistogram

func NewHistogram(opts prometheus.HistogramOpts, fieldKeys []string) metrics.Histogram

NewHistogram returns a new Histogram backed by a Prometheus Histogram. The histogram is automatically registered via prometheus.Register.

For more information on Prometheus histograms and summaries, refer to http://prometheus.io/docs/practices/histograms.

func NewSummary

func NewSummary(opts prometheus.SummaryOpts, fieldKeys []string) metrics.Histogram

NewSummary returns a new Histogram backed by a Prometheus summary. The histogram is automatically registered via prometheus.Register.

For more information on Prometheus histograms and summaries, refer to http://prometheus.io/docs/practices/histograms.

func RegisterCallbackGauge

func RegisterCallbackGauge(opts prometheus.GaugeOpts, callback func() float64)

RegisterCallbackGauge registers a Gauge with Prometheus whose value is determined at collect time by the passed callback function. The callback determines the value, and fields are ignored, so RegisterCallbackGauge returns nothing.

Types

This section is empty.

Jump to

Keyboard shortcuts

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