metrics

package
v1.5.0-rc5 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2018 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StopDatadog

func StopDatadog()

StopDatadog stops internal datadogTicker which controls the pushing of metrics to DD Agent and resets it to `nil`.

func StopInfluxDB added in v1.5.0

func StopInfluxDB()

StopInfluxDB stops internal influxDBTicker which controls the pushing of metrics to InfluxDB Agent and resets it to `nil`

func StopStatsd

func StopStatsd()

StopStatsd stops internal statsdTicker which controls the pushing of metrics to StatsD Agent and resets it to `nil`

Types

type PrometheusHandler added in v1.5.0

type PrometheusHandler struct{}

PrometheusHandler expose Prometheus routes

func (PrometheusHandler) AddRoutes added in v1.5.0

func (h PrometheusHandler) AddRoutes(router *mux.Router)

AddRoutes add Prometheus routes on a router

type Registry

type Registry interface {
	// IsEnabled shows whether metrics instrumentation is enabled.
	IsEnabled() bool
	ReqsCounter() metrics.Counter
	ReqDurationHistogram() metrics.Histogram
	RetriesCounter() metrics.Counter
}

Registry has to implemented by any system that wants to monitor and expose metrics.

func NewMultiRegistry

func NewMultiRegistry(registries []Registry) Registry

NewMultiRegistry creates a new standardRegistry that wraps multiple Registries.

func NewVoidRegistry

func NewVoidRegistry() Registry

NewVoidRegistry is a noop implementation of metrics.Registry. It is used to avoid nil checking in components that do metric collections.

func RegisterDatadog

func RegisterDatadog(config *types.Datadog) Registry

RegisterDatadog registers the metrics pusher if this didn't happen yet and creates a datadog Registry instance.

func RegisterInfluxDB added in v1.5.0

func RegisterInfluxDB(config *types.InfluxDB) Registry

RegisterInfluxDB registers the metrics pusher if this didn't happen yet and creates a InfluxDB Registry instance.

func RegisterPrometheus

func RegisterPrometheus(config *types.Prometheus) Registry

RegisterPrometheus registers all Prometheus metrics. It must be called only once and failing to register the metrics will lead to a panic.

func RegisterStatsd

func RegisterStatsd(config *types.Statsd) Registry

RegisterStatsd registers the metrics pusher if this didn't happen yet and creates a statsd Registry instance.

Jump to

Keyboard shortcuts

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