diff --git a/lib/statsd/instrument.rb b/lib/statsd/instrument.rb index ef31b1c8..381455f9 100644 --- a/lib/statsd/instrument.rb +++ b/lib/statsd/instrument.rb @@ -124,8 +124,7 @@ def self.write(k,v,op, sample_rate = default_sample_rate) return unless enabled return if sample_rate < 1 && rand > sample_rate - command = "#{k}:#{v}" - command.prepend("#{prefix}.") if prefix + command = "#{self.prefix + '.' if self.prefix}#{k}:#{v}" case op when :incr command << '|c'