metrics

package
v2.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2019 License: LGPL-3.0 Imports: 12 Imported by: 9

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 (

	// MetricsEnabledFlag metrics enable flag
	MetricsEnabledFlag = "metrics"
)

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(neb Neblet)

Start metrics monitor

func Stop

func Stop()

Stop metrics monitor

Types

type Neblet

type Neblet interface {
	Config() *nebletpb.Config
}

Neblet interface breaks cycle import dependency.

Jump to

Keyboard shortcuts

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