statsd

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Sink

type Sink struct {
	// contains filtered or unexported fields
}

Sink provides a MetricSink that can be used with a statsite or statsd metrics server. It uses only UDP packets, while StatsiteSink uses TCP.

func NewSink

func NewSink(addr string) (*Sink, error)

NewSink is used to create a new Sink

func (*Sink) AddSample

func (s *Sink) AddSample(key []string, val float32)

AddSample adds a sample metrics

func (*Sink) AddSampleWithLabels

func (s *Sink) AddSampleWithLabels(key []string, val float32, labels []metrics.Label)

AddSampleWithLabels adds a sample metrics with labels

func (*Sink) EmitKey

func (s *Sink) EmitKey(key []string, val float32)

EmitKey emits a key value metric

func (*Sink) IncrCounter

func (s *Sink) IncrCounter(key []string, val float32)

IncrCounter increases the value of a counter by a given value

func (*Sink) IncrCounterWithLabels

func (s *Sink) IncrCounterWithLabels(key []string, val float32, labels []metrics.Label)

IncrCounterWithLabels increases the value of a counter by a given value with labels

func (*Sink) SetGauge

func (s *Sink) SetGauge(key []string, val float32)

SetGauge sets a value on a gauge

func (*Sink) SetGaugeWithLabels

func (s *Sink) SetGaugeWithLabels(key []string, val float32, labels []metrics.Label)

SetGaugeWithLabels sets a value on a gauge with labels

func (*Sink) Shutdown

func (s *Sink) Shutdown()

Shutdown is used to stop flushing to statsd

Jump to

Keyboard shortcuts

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