-- import "github.com/statsd/datadog"
Package datadog implements a simple dogstatsd client
c, err := Dial(":5000")
c.SetPrefix("myprogram")
c.SetTags("env:stage", "program:myprogram")
c.Incr("count")
typeClientstruct {
sync.Mutex
}Client represents a datadog client.
funcDial(addrstring) (*Client, error)Dial connects to addr and returns a client.
funcDialSize(addrstring, sizeint) (*Client, error)DialSize connects with the given buffer size. see https://git.io/vzC0D.
funcNew(w io.Writer) *ClientNew returns a new Client with writer w, useful for testing.
func (c*Client) Close() errorClose will flush and close the connection.
func (c*Client) Decr(namestring, tags...string) errorDecr decrements counter name with tags.
func (c*Client) DecrBy(namestring, nint, tags...string) errorDecrBy decrements counter name by n with optional tags.
func (c*Client) Duration(namestring, d time.Duration, tags...string) errorDuration uses Histogram() to send the given d duration.
func (c*Client) Flush() errorFlush will flush the underlying buffer.
func (c*Client) Gauge(namestring, nint, tags...string) errorGauge sets the metric name to n at a given time.
func (c*Client) Histogram(namestring, vint, tags...string) errorHistogram measures the statistical distribution of a metric name with the
given v value, rate and tags.
func (c*Client) Incr(namestring, tags...string) errorIncr increments counter name with tags.
func (c*Client) IncrBy(namestring, nint, tags...string) errorIncrBy increments counter name by n with optional tags.
func (c*Client) Increment(namestring, countint, ratefloat64, tags...string) errorIncrement incremenets the given stat name with the given count, rate and
tags....
func (c*Client) SetPrefix(namestring)SetPrefix sets global prefix name.
func (c*Client) SetTags(tags...string)SetTags sets global tags tags....
func (c*Client) Unique(name, valuestring, tags...string) errorUnique records a unique occurence of events.