File: README.md

package info (click to toggle)
golang-github-uber-go-tally 4.1.16-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,228 kB
  • sloc: makefile: 89; sh: 13
file content (29 lines) | stat: -rw-r--r-- 737 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# A buffered statsd reporter

See `examples/statsd_main.go` for an end to end example.

Some emitted stats using the example listening with `nc 8125 -l -u`:

```
stats.my-service.test-histogram.100ms-200ms:2|c
stats.my-service.test-histogram.300ms-400ms:1|c
stats.my-service.test-histogram.600ms-800ms:1|c
stats.my-service.test-counter:1|c
stats.my-service.test-gauge:813|g
```

## Options

You can use either a basic or a buffered statsd client
and pass it to the reporter along with options.

The reporter options are:

```go
// Options is a set of options for the tally reporter.
type Options struct {
	// SampleRate is the metrics emission sample rate. If you
	// do not set this value it will be set to 1.
	SampleRate float32
}
```