module StatsD::Instrument::StrictMetaprogramming
def check_method_and_metric_name(method, metric_name)
def check_method_and_metric_name(method, metric_name) unless method.is_a?(Symbol) raise ArgumentError, "The method name should be provided as symbol, got #{method.inspect}" end unless metric_name.is_a?(String) || metric_name.is_a?(Proc) raise ArgumentError, "The metric name should be a proc or string, got #{metric_name.inspect}" end end
def statsd_count(method, name, sample_rate: nil, tags: nil, no_prefix: false, client: nil)
def statsd_count(method, name, sample_rate: nil, tags: nil, no_prefix: false, client: nil) check_method_and_metric_name(method, name) super end
def statsd_count_if(method, name, sample_rate: nil, tags: nil, no_prefix: false, client: nil)
def statsd_count_if(method, name, sample_rate: nil, tags: nil, no_prefix: false, client: nil) check_method_and_metric_name(method, name) super end
def statsd_count_success(method, name, sample_rate: nil, tags: nil, no_prefix: false, client: nil)
def statsd_count_success(method, name, sample_rate: nil, tags: nil, no_prefix: false, client: nil) check_method_and_metric_name(method, name) super end
def statsd_distribution(method, name, sample_rate: nil, tags: nil, no_prefix: false, client: nil)
def statsd_distribution(method, name, sample_rate: nil, tags: nil, no_prefix: false, client: nil) check_method_and_metric_name(method, name) super end
def statsd_measure(method, name, sample_rate: nil, tags: nil, no_prefix: false, client: nil)
def statsd_measure(method, name, sample_rate: nil, tags: nil, no_prefix: false, client: nil) check_method_and_metric_name(method, name) super end