datadog

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2019 License: MIT Imports: 4 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 dogstatsd server. It utilizes the Dogstatsd client at github.com/DataDog/datadog-go/statsd

func NewSink

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

NewSink is used to create a new Sink with sane defaults

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 is not implemented since DogStatsd does not provide a metric type that holds an arbitrary number of values

func (*Sink) EnableHostNamePropagation

func (s *Sink) 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 (*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) SetTags

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

SetTags sets common tags on the Dogstatsd Client that will be sent along with all dogstatsd packets. Ref: http://docs.datadoghq.com/guides/dogstatsd/#tags

Jump to

Keyboard shortcuts

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