lib/statsd/instrument/strict.rb in statsd-instrument-2.7.0 vs lib/statsd/instrument/strict.rb in statsd-instrument-2.7.1

- old
+ new

@@ -112,11 +112,11 @@ # Unfortunately, we have to inline the new method implementation ebcause we have to fix the # Stats.measure call to not use the `as_dist` and `prefix` arguments. add_to_method(method, name, :measure) do define_method(method) do |*args, &block| - key = StatsD::Instrument.generate_metric_name(name, self, *args) + key = StatsD::Instrument.generate_metric_name(nil, name, self, *args) StatsD.measure(key, sample_rate: sample_rate, tags: tags, no_prefix: no_prefix) do super(*args, &block) end end end @@ -128,11 +128,11 @@ # Unfortunately, we have to inline the new method implementation ebcause we have to fix the # Stats.distribution call to not use the `prefix` argument. add_to_method(method, name, :distribution) do define_method(method) do |*args, &block| - key = StatsD::Instrument.generate_metric_name(name, self, *args) + key = StatsD::Instrument.generate_metric_name(nil, name, self, *args) StatsD.distribution(key, sample_rate: sample_rate, tags: tags, no_prefix: no_prefix) do super(*args, &block) end end end @@ -160,11 +160,11 @@ end end result ensure suffix = truthiness == false ? 'failure' : 'success' - key = "#{StatsD::Instrument.generate_metric_name(name, self, *args)}.#{suffix}" + key = "#{StatsD::Instrument.generate_metric_name(nil, name, self, *args)}.#{suffix}" StatsD.increment(key, sample_rate: sample_rate, tags: tags, no_prefix: no_prefix) end end end end @@ -191,11 +191,11 @@ end end result ensure if truthiness - key = StatsD::Instrument.generate_metric_name(name, self, *args) + key = StatsD::Instrument.generate_metric_name(nil, name, self, *args) StatsD.increment(key, sample_rate: sample_rate, tags: tags, no_prefix: no_prefix) end end end end @@ -207,10 +207,10 @@ # Unfortunately, we have to inline the new method implementation ebcause we have to fix the # Stats.increment call to not use the `prefix` argument. add_to_method(method, name, :count) do define_method(method) do |*args, &block| - key = StatsD::Instrument.generate_metric_name(name, self, *args) + key = StatsD::Instrument.generate_metric_name(nil, name, self, *args) StatsD.increment(key, sample_rate: sample_rate, tags: tags, no_prefix: no_prefix) super(*args, &block) end end end