Documentation ¶
Index ¶
- Variables
- func PublishCounter(name string, tags map[string]string, value int)
- func PublishGauge(name string, value int)
- func PublishGaugeWithTags(name string, value int, tags map[string]string)
- func PublishIncrementCounter(name string)
- func PublishTimer(name string, value time.Duration)
- func PublishTimerWithTags(name string, value time.Duration, tags map[string]string)
- type StopWatch
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultTags = map[string]string{}
DefaultTags are automatically added to all published metrics
View Source
var MetricsPublisherDisabled = false
MetricsPublisherDisabled short circuits publishing to Atlas
Functions ¶
func PublishCounter ¶
PublishCounter creates, and pushes a counter to Atlas with a specific value
func PublishGauge ¶
PublishGauge creates, and pushes a gauge to Atlas with default tags
func PublishGaugeWithTags ¶
PublishGaugeWithTags creates, and pushes a gauge to Atlas with specific tags
func PublishIncrementCounter ¶
func PublishIncrementCounter(name string)
PublishIncrementCounter creates, and pushes a counter to Atlas with a value of 1
func PublishTimer ¶
PublishTimer creates, and pushes a gauge to Atlas with default tags
Types ¶
type StopWatch ¶
type StopWatch struct {
// contains filtered or unexported fields
}
StopWatch is used to measure durations
func NewStopWatch ¶
func NewStopWatch() *StopWatch
NewStopWatch initializes a Stopwatch with the current time
Click to show internal directories.
Click to hide internal directories.