metrics

package
v0.0.0-...-84d53aa Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2019 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultTimeout is the default connection timeout used to connect to an InfluxDB instance
	DefaultTimeout = 3 * time.Second
)
View Source
const (
	EnabledFlag = "metrics"
)

MetricsEnabledFlag metrics enable flag

Variables

This section is empty.

Functions

func EnableMetrics

func EnableMetrics()

EnableMetrics enable the metrics service

func InfluxDB

func InfluxDB(r metrics.Registry, d time.Duration, url, database, username, password string)

InfluxDB starts a InfluxDB reporter which will post the metrics from the given registry at each d interval.

func InfluxDBWithTags

func InfluxDBWithTags(r metrics.Registry, d time.Duration, url, database, username, password string, tags map[string]string)

InfluxDBWithTags starts a InfluxDB reporter which will post the metrics from the given registry at each d interval with the specified tags

func NewCounter

func NewCounter(name string) metrics.Counter

NewCounter create a new metrics Counter

func NewGauge

func NewGauge(name string) metrics.Gauge

NewGauge create a new metrics Gauge

func NewHistogramWithUniformSample

func NewHistogramWithUniformSample(name string, reservoirSize int) metrics.Histogram

NewHistogramWithUniformSample create a new metrics History with Uniform Sample algorithm.

func NewMeter

func NewMeter(name string) metrics.Meter

NewMeter create a new metrics Meter

func NewTimer

func NewTimer(name string) metrics.Timer

NewTimer create a new metrics Timer

func Start

func Start(med Medlet)

Start metrics monitor

func Stop

func Stop()

Stop metrics monitor

Types

type Medlet

type Medlet interface {
	Config() *medletpb.Config
}

Medlet interface breaks cycle import dependency.

Jump to

Keyboard shortcuts

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