At high traffic levels, the locking around sending on channels can cause
a large amount of blocking and CPU usage. These adds an event queue
mechanism so that events are queued for short period of time, and
flushed in batches to the main exporter goroutine periodically.
The default is is to flush every 1000 events, or every 200ms, whichever
happens first.
Signed-off-by: Clayton O'Neill <claytono@github.com>
* add TCP StatsD listener support
* add listen-tcp flag to control UDP/TCP mode on same port
* statsdListenUDP/statsdListenTCP as string, and alias listen-address to listen-udp
* add stats for tcp error/line_too_long
* add test for TCP listener