Documentation ¶
Index ¶
- type Sink
- func (s *Sink) AddSample(key []string, val float32)
- func (s *Sink) AddSampleWithLabels(key []string, val float32, labels []metrics.Label)
- func (s *Sink) EmitKey(key []string, val float32)
- func (s *Sink) EnableHostNamePropagation()
- func (s *Sink) IncrCounter(key []string, val float32)
- func (s *Sink) IncrCounterWithLabels(key []string, val float32, labels []metrics.Label)
- func (s *Sink) SetGauge(key []string, val float32)
- func (s *Sink) SetGaugeWithLabels(key []string, val float32, labels []metrics.Label)
- func (s *Sink) SetTags(tags []string)
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 (*Sink) AddSampleWithLabels ¶
AddSampleWithLabels adds a sample metrics with labels
func (*Sink) EmitKey ¶
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 ¶
IncrCounter increases the value of a counter by a given value
func (*Sink) IncrCounterWithLabels ¶
IncrCounterWithLabels increases the value of a counter by a given value with labels
func (*Sink) SetGaugeWithLabels ¶
SetGaugeWithLabels sets a value on a gauge with labels
func (*Sink) SetTags ¶
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