Package list golang-github-go-kit-kit / 97c05e6
doc fix JP Robinson 5 years ago
1 changed file(s) with 4 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
2020 )
2121
2222 // Emitter will keep track of all metrics and, once started,
23 // will emit the metrics via the Flush method to the given io.Writer.
23 // will emit the metrics via the Flush method to the given address.
2424 type Emitter interface {
2525 NewCounter(string) metrics.Counter
2626 NewHistogram(string, int64, int64, int, ...int) metrics.Histogram
4343
4444 // NewEmitter will return an Emitter that will prefix all
4545 // metrics names with the given prefix. Once started, it will attempt to create
46 // a TCP connection with the given address and most metrics to the connection
47 // in a Graphite-compatible format.
46 // a TCP connection with the given address and periodically post metrics to the
47 // connection in a Graphite-compatible format.
4848 func NewEmitter(addr *net.TCPAddr, prefix string) Emitter {
4949 e := &emitter{
5050 addr, prefix, &sync.Mutex{},
226226 gauges map[int]metrics.Gauge
227227 }
228228
229 // NewWindowedHistogram is taken from http://github.com/codahale/metrics. It returns a
229 // newWindowedHistogram is taken from http://github.com/codahale/metrics. It returns a
230230 // windowed HDR histogram which drops data older than five minutes.
231231 //
232232 // The histogram exposes metrics for each passed quantile as gauges. Users are expected