modulepackage
2.1.2+incompatible
Repository: https://github.com/infosum/statsd.git
Documentation: pkg.go.dev
# README
statsd
Introduction
statsd is a simple and efficient Statsd client.
This is a fork of the Go Statsd client by alexcesaro. This features some additions to gauges and listener-less client startup.
Features
- Supports all StatsD metrics: counter, gauge (relative and absolute), 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
Download
go get github.com/infosum/statsd
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 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.