refactor(notifications): use single event for all sinks
The notification system was built assuming that events would be queued and be sent in batches. However we only call Write
one event at a time, meaning we only enqueue one single event, so when the queue is waiting for events it always pulls one as well.
To make the code easier to read, we can remove the slices in the Sink
interface along with the metrics listener.
We also ensure we only allocate one event at a time, instead of copying it every time a Sink calls the next in the chain, so that's a quick win.
Related to #851 (closed)
Edited by Jaime Martinez