java-dogstatsd-client
java-dogstatsd-client copied to clipboard
Special characters are not escaped
The library does not escape special characters in metric names and tags, which can result in malformed packets and unexpected tags being sent over the wire.
E.g. this:
final NonBlockingStatsDClient c = new NonBlockingStatsDClient("", "localhost", 8125);
c.gauge("check:11|g#this:out", 42, "tag1,tag2,tag3");
c.close();
Results in:
$ nc -u -l localhost 8125
check:11|g#this:out:42|g|#tag1,tag2,tag3