Skip to content

Commit

Permalink
Statsite require a newline in packets
Browse files Browse the repository at this point in the history
  • Loading branch information
titanous committed Jun 16, 2012
1 parent ef11078 commit 754a0dc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/statsd/instrument.rb
Expand Up @@ -142,6 +142,7 @@ def self.write(k,v,op, sample_rate = default_sample_rate)
end

command << "|@#{sample_rate}" if sample_rate < 1 || (self.implementation == :statsite && sample_rate > 1)
command << "\n" if self.implementation == :statsite

if mode.to_s == 'production'
socket_wrapper { socket.send(command, 0, host, port) }
Expand Down

0 comments on commit 754a0dc

Please sign in to comment.