Codebase list golang-github-go-kit-kit / dcda866
updating emitter with new statsd names JP Robinson 7 years ago
1 changed file(s) with 5 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
6363 // comes first. Fields are ignored.
6464 func (e *Emitter) NewCounter(key string) metrics.Counter {
6565 key = e.prefix + key
66 return &statsdCounter{
66 return &counter{
6767 key: key,
6868 c: stringToKeyVal(key, e.keyVals),
6969 }
7878 // milliseconds. If you observe in units of nanoseconds, you can make the
7979 // translation with a ScaledHistogram:
8080 //
81 // NewScaledHistogram(statsdHistogram, time.Millisecond)
81 // NewScaledHistogram(histogram, time.Millisecond)
8282 //
8383 // You can also enforce the constraint in a typesafe way with a millisecond
8484 // TimeHistogram:
8585 //
86 // NewTimeHistogram(statsdHistogram, time.Millisecond)
86 // NewTimeHistogram(histogram, time.Millisecond)
8787 //
8888 // TODO: support for sampling.
8989 func (e *Emitter) NewHistogram(key string) metrics.Histogram {
9090 key = e.prefix + key
91 return &statsdHistogram{
91 return &histogram{
9292 key: key,
9393 h: stringToKeyVal(key, e.keyVals),
9494 }
102102 // TODO: support for sampling
103103 func (e *Emitter) NewGauge(key string) metrics.Gauge {
104104 key = e.prefix + key
105 return &statsdGauge{
105 return &gauge{
106106 key: key,
107107 g: stringToKeyVal(key, e.keyVals),
108108 }