We send the slice off to be process, but potentially start overwriting
the previous content straight away. Just start again with a fresh slice.
Fixes#247
Signed-off-by: Tristan Colgate <tristan@qubit.com>
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>