etsy/statsd — pull request #460 by benburry (2014-10-10 17:32:40+00:00)
Title: Buffer incoming tcp data until we receive a complete metric

The current implementation of the TCP server is broken, as it doesn't buffer incoming data until it receives a complete metric. This leads to partial metric strings trying to be processed by statsd.

This change (crudely) buffers incoming tcp data until it receives one or more newlines. It submits the section of the buffered data up to the last newline to statsd as a packet of metrics, and trims the buffer to the remaining string.