modulepackage
2.0.0+incompatible
Repository: https://github.com/alexcesaro/statsd.git
Documentation: pkg.go.dev
# README
statsd
Introduction
statsd is a simple and efficient Statsd client.
See the benchmark for a comparison with other Go StatsD clients.
Features
- Supports all StatsD metrics: counter, gauge, timing and set
- Supports InfluxDB and Datadog tags
- Fast and GC-friendly: all functions for sending metrics do not allocate
- Efficient: metrics are buffered by default
- Simple and clean API
- 100% test coverage
- Versioned API using gopkg.in
Documentation
https://godoc.org/gopkg.in/alexcesaro/statsd.v2
Download
go get gopkg.in/alexcesaro/statsd.v2
Example
See the examples in the documentation.
License
Contribute
Do you have any question the documentation does not answer? Is there a use case that you feel is common and is not well-addressed by the current API?
If so you are more than welcome to ask questions in the thread on golang-nuts or open an issue or send a pull-request here on Github.
# Functions
Address sets the address of the StatsD daemon.
ErrorHandler sets the function called when an error happens when sending metrics (e.g.
FlushPeriod sets how often the Client's buffer is flushed.
MaxPacketSize sets the maximum packet size in bytes sent by the Client.
Mute sets whether the Client is muted.
Network sets the network (udp, tcp, etc) used by the client.
New returns a new Client.
Prefix appends the prefix that will be used in every bucket name.
SampleRate sets the sample rate of the Client.
Tags appends the given tags to the tags sent with every metrics.
TagsFormat sets the format of tags.