lib/statsd/instrument/strict.rb in statsd-instrument-3.1.2 vs lib/statsd/instrument/strict.rb in statsd-instrument-3.2.0
- old
+ new
@@ -25,32 +25,36 @@
# This monkeypatch is not meant to be used in production.
module Strict
def increment(key, value = 1, sample_rate: nil, tags: nil, no_prefix: false)
raise ArgumentError, "StatsD.increment does not accept a block" if block_given?
raise ArgumentError, "The value argument should be an integer, got #{value.inspect}" unless value.is_a?(Integer)
+
check_tags_and_sample_rate(sample_rate, tags)
super
end
def gauge(key, value, sample_rate: nil, tags: nil, no_prefix: false)
raise ArgumentError, "StatsD.increment does not accept a block" if block_given?
raise ArgumentError, "The value argument should be an integer, got #{value.inspect}" unless value.is_a?(Numeric)
+
check_tags_and_sample_rate(sample_rate, tags)
super
end
def histogram(key, value, sample_rate: nil, tags: nil, no_prefix: false)
raise ArgumentError, "StatsD.increment does not accept a block" if block_given?
raise ArgumentError, "The value argument should be an integer, got #{value.inspect}" unless value.is_a?(Numeric)
+
check_tags_and_sample_rate(sample_rate, tags)
super
end
def set(key, value, sample_rate: nil, tags: nil, no_prefix: false)
raise ArgumentError, "StatsD.set does not accept a block" if block_given?
+
check_tags_and_sample_rate(sample_rate, tags)
super
end