Version: v0.4.0 Latest Latest

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

Go to latest
Published: May 25, 2022 License: MIT Imports: 4 Imported by: 254




This section is empty.


This section is empty.


This section is empty.


type DogStatsdSink

type DogStatsdSink struct {
	// contains filtered or unexported fields

DogStatsdSink provides a MetricSink that can be used with a dogstatsd server. It utilizes the Dogstatsd client at

func NewDogStatsdSink

func NewDogStatsdSink(addr string, hostName string) (*DogStatsdSink, error)

NewDogStatsdSink is used to create a new DogStatsdSink with sane defaults

func (*DogStatsdSink) AddSample

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

func (*DogStatsdSink) AddSampleWithLabels

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

func (*DogStatsdSink) EmitKey

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

EmitKey is not implemented since DogStatsd does not provide a metric type that holds an arbitrary number of values

func (*DogStatsdSink) EnableHostNamePropagation

func (s *DogStatsdSink) EnableHostNamePropagation()

EnableHostnamePropagation forces a Dogstatsd `host` tag with the value specified by `s.HostName` Since the go-metrics package has its own mechanism for attaching a hostname to metrics, setting the `propagateHostname` flag ensures that `s.HostName` overrides the host tag naively set by the DogStatsd server

func (*DogStatsdSink) IncrCounter

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

func (*DogStatsdSink) IncrCounterWithLabels

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

func (*DogStatsdSink) SetGauge

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

func (*DogStatsdSink) SetGaugeWithLabels

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

The following ...WithLabels methods correspond to Datadog's Tag extension to Statsd.

func (*DogStatsdSink) SetTags

func (s *DogStatsdSink) SetTags(tags []string)

SetTags sets common tags on the Dogstatsd Client that will be sent along with all dogstatsd packets. Ref:

func (*DogStatsdSink) Shutdown added in v0.3.11

func (s *DogStatsdSink) Shutdown()

Shutdown disables further metric collection, blocks to flush data, and tears down the sink.

Source Files

Jump to

Keyboard shortcuts

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