datadog

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2018 License: MIT Imports: 6 Imported by: 3

Documentation

Overview

Package datadog provides stats logging using datadog.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DataDogStats

type DataDogStats struct {
	sync.Mutex
	// contains filtered or unexported fields
}

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) Close

func (stats *DataDogStats) Close() error

Close closes statsd client

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).

Jump to

Keyboard shortcuts

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