reinh / statsd

A Ruby Statsd client that isn't a direct port of the Python example code. Because Ruby isn't Python.
MIT License
411 stars 154 forks source link

Newline is missing at the end of the metric thus breaking TCP support #76

Closed imriz closed 3 years ago

imriz commented 4 years ago

New lines are not being appended to the metric (https://github.com/reinh/statsd/blob/3863a1a341d21b3c81a0ab9aebc6bd901da45323/lib/statsd.rb#L502), and therefore breaks TCP (since newlines are mandatory in TCP, see https://github.com/statsd/statsd/blob/3a3ced99de00855dfc0a45386f466ad5a8d8a549/docs/server.md).

gdxn96 commented 4 years ago

https://github.com/reinh/statsd/blob/3863a1a341d21b3c81a0ab9aebc6bd901da45323/lib/statsd.rb#L479

This line ^ Needs

message += "\n"

above it for TCP to work