Documentation ¶
Overview ¶
Package datadog provides stats logging using datadog.
Index ¶
- type DataDogStats
- func (stats *DataDogStats) Close() error
- func (stats *DataDogStats) DecCount(name string, tags ...string)
- func (stats *DataDogStats) DecCountBy(name string, value int64, tags ...string)
- func (stats *DataDogStats) Duration(duration time.Duration, name string, tags ...string)
- func (stats *DataDogStats) ElapsedTime(start time.Time, name string, tags ...string)
- func (stats *DataDogStats) Event(title, mesg, aggKey, typ string, timestamp time.Time, tags ...string)
- func (stats *DataDogStats) Gauge(name string, value int64, tags ...string)
- func (stats *DataDogStats) Histogram(name string, value int64, tags ...string)
- func (stats *DataDogStats) IncCount(name string, tags ...string)
- func (stats *DataDogStats) IncCountBy(name string, value int64, tags ...string)
- func (stats *DataDogStats) ServiceCheck(name, mesg string, status int, timestamp time.Time, tags ...string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DataDogStats ¶
DataDogStats is statsd client wrapper
func New ¶
func New(address, namespace string, tags ...string) (*DataDogStats, error)
New returns a DataDog stats instance that implements the Stats interface and sends data to the provided datadog address.
func (*DataDogStats) DecCount ¶
func (stats *DataDogStats) DecCount(name string, tags ...string)
DecCount decrement stats by 1
func (*DataDogStats) DecCountBy ¶
func (stats *DataDogStats) DecCountBy(name string, value int64, tags ...string)
DecCountBy decrement stats by specified value
func (*DataDogStats) Duration ¶
func (stats *DataDogStats) Duration(duration time.Duration, name string, tags ...string)
Duration captures the duration as timing stats
func (*DataDogStats) ElapsedTime ¶
func (stats *DataDogStats) ElapsedTime(start time.Time, name string, tags ...string)
ElapsedTime captures the timing based on start time and current time
func (*DataDogStats) Event ¶
func (stats *DataDogStats) Event(title, mesg, aggKey, typ string, timestamp time.Time, tags ...string)
Event contains details of an activity that was captured and notifies it to stats backend
func (*DataDogStats) Gauge ¶
func (stats *DataDogStats) Gauge(name string, value int64, tags ...string)
Gauge generates Gauge
func (*DataDogStats) Histogram ¶
func (stats *DataDogStats) Histogram(name string, value int64, tags ...string)
Histogram generates Histogram
func (*DataDogStats) IncCount ¶
func (stats *DataDogStats) IncCount(name string, tags ...string)
IncCount is used to capture stats are are continuous and increment it by 1
func (*DataDogStats) IncCountBy ¶
func (stats *DataDogStats) IncCountBy(name string, value int64, tags ...string)
IncCountBy decrement stats by specified value
func (*DataDogStats) ServiceCheck ¶
func (stats *DataDogStats) ServiceCheck(name, mesg string, status int, timestamp time.Time, tags ...string)
ServiceCheck notifies monitoring backend about the status of service (Ok/Warning/Critical/Unknow).