Versions in this module Expand all Collapse all v0 v0.6.0 May 25, 2016 v0.5.0 Feb 5, 2016 Changes in this version + const DefaultSignal + func AddSample(key []string, val float32) + func EmitKey(key []string, val float32) + func IncrCounter(key []string, val float32) + func MeasureSince(key []string, start time.Time) + func SetGauge(key []string, val float32) + type AggregateSample struct + Count int + LastUpdated time.Time + Max float64 + Min float64 + Sum float64 + SumSq float64 + func (a *AggregateSample) Ingest(v float64) + func (a *AggregateSample) Mean() float64 + func (a *AggregateSample) Stddev() float64 + func (a *AggregateSample) String() string + type BlackholeSink struct + func (*BlackholeSink) AddSample(key []string, val float32) + func (*BlackholeSink) EmitKey(key []string, val float32) + func (*BlackholeSink) IncrCounter(key []string, val float32) + func (*BlackholeSink) SetGauge(key []string, val float32) + type Config struct + EnableHostname bool + EnableRuntimeMetrics bool + EnableTypePrefix bool + HostName string + ProfileInterval time.Duration + ServiceName string + TimerGranularity time.Duration + func DefaultConfig(serviceName string) *Config + type FanoutSink []MetricSink + func (fh FanoutSink) AddSample(key []string, val float32) + func (fh FanoutSink) EmitKey(key []string, val float32) + func (fh FanoutSink) IncrCounter(key []string, val float32) + func (fh FanoutSink) SetGauge(key []string, val float32) + type InmemSignal struct + func DefaultInmemSignal(inmem *InmemSink) *InmemSignal + func NewInmemSignal(inmem *InmemSink, sig syscall.Signal, w io.Writer) *InmemSignal + func (i *InmemSignal) Stop() + type InmemSink struct + func NewInmemSink(interval, retain time.Duration) *InmemSink + func (i *InmemSink) AddSample(key []string, val float32) + func (i *InmemSink) Data() []*IntervalMetrics + func (i *InmemSink) EmitKey(key []string, val float32) + func (i *InmemSink) IncrCounter(key []string, val float32) + func (i *InmemSink) SetGauge(key []string, val float32) + type IntervalMetrics struct + Counters map[string]*AggregateSample + Gauges map[string]float32 + Interval time.Time + Points map[string][]float32 + Samples map[string]*AggregateSample + func NewIntervalMetrics(intv time.Time) *IntervalMetrics + type MetricSink interface + AddSample func(key []string, val float32) + EmitKey func(key []string, val float32) + IncrCounter func(key []string, val float32) + SetGauge func(key []string, val float32) + type Metrics struct + func New(conf *Config, sink MetricSink) (*Metrics, error) + func NewGlobal(conf *Config, sink MetricSink) (*Metrics, error) + func (m *Metrics) AddSample(key []string, val float32) + func (m *Metrics) EmitKey(key []string, val float32) + func (m *Metrics) IncrCounter(key []string, val float32) + func (m *Metrics) MeasureSince(key []string, start time.Time) + func (m *Metrics) SetGauge(key []string, val float32) + type StatsdSink struct + func NewStatsdSink(addr string) (*StatsdSink, error) + func (s *StatsdSink) AddSample(key []string, val float32) + func (s *StatsdSink) EmitKey(key []string, val float32) + func (s *StatsdSink) IncrCounter(key []string, val float32) + func (s *StatsdSink) SetGauge(key []string, val float32) + func (s *StatsdSink) Shutdown() + type StatsiteSink struct + func NewStatsiteSink(addr string) (*StatsiteSink, error) + func (s *StatsiteSink) AddSample(key []string, val float32) + func (s *StatsiteSink) EmitKey(key []string, val float32) + func (s *StatsiteSink) IncrCounter(key []string, val float32) + func (s *StatsiteSink) SetGauge(key []string, val float32) + func (s *StatsiteSink) Shutdown()