github.com/uber-go/tally/v4@v4.1.17/statsd/README.md (about) 1 # A buffered statsd reporter 2 3 See `examples/statsd_main.go` for an end to end example. 4 5 Some emitted stats using the example listening with `nc 8125 -l -u`: 6 7 ``` 8 stats.my-service.test-histogram.100ms-200ms:2|c 9 stats.my-service.test-histogram.300ms-400ms:1|c 10 stats.my-service.test-histogram.600ms-800ms:1|c 11 stats.my-service.test-counter:1|c 12 stats.my-service.test-gauge:813|g 13 ``` 14 15 ## Options 16 17 You can use either a basic or a buffered statsd client 18 and pass it to the reporter along with options. 19 20 The reporter options are: 21 22 ```go 23 // Options is a set of options for the tally reporter. 24 type Options struct { 25 // SampleRate is the metrics emission sample rate. If you 26 // do not set this value it will be set to 1. 27 SampleRate float32 28 } 29 ```