datadog

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2022 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 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 github.com/DataDog/datadog-go/statsd

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. http://docs.datadoghq.com/guides/dogstatsd/#tags

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: http://docs.datadoghq.com/guides/dogstatsd/#tags

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.

Jump to

Keyboard shortcuts

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