prometheus

package
v0.0.0-...-f2a95d0 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2015 License: MIT Imports: 3 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(namespace, subsystem, name, help string, fieldKeys []string) metrics.Counter

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

func NewCounterWithLabels

func NewCounterWithLabels(namespace, subsystem, name, help string, fieldKeys []string, constLabels prometheus.Labels) metrics.Counter

NewCounterWithLabels is the same as NewCounter, but attaches a set of const label pairs to the metric.

func NewGauge

func NewGauge(namespace, subsystem, name, help string, fieldKeys []string) metrics.Gauge

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

func NewGaugeWithLabels

func NewGaugeWithLabels(namespace, subsystem, name, help string, fieldKeys []string, constLabels prometheus.Labels) metrics.Gauge

NewGaugeWithLabels is the same as NewGauge, but attaches a set of const label pairs to the metric.

func NewHistogram

func NewHistogram(namespace, subsystem, name, help string, fieldKeys []string) metrics.Histogram

NewHistogram returns a new Histogram backed by a Prometheus summary. It uses a 10-second max age for bucketing. The histogram is automatically registered via prometheus.Register.

func NewHistogramWithLabels

func NewHistogramWithLabels(namespace, subsystem, name, help string, fieldKeys []string, constLabels prometheus.Labels) metrics.Histogram

NewHistogramWithLabels is the same as NewHistogram, but attaches a set of const label pairs to the metric.

Types

This section is empty.

Jump to

Keyboard shortcuts

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