def statsd_count(method, name, *metric_options)
      add_to_method(method, name, :count) do
        define_method(method) do |*args, &block|
          StatsD.increment(StatsD::Instrument.generate_metric_name(name, self, *args), 1, *metric_options)
          super(*args, &block)
        end
      end
    end
def statsd_count(method, name, *metric_options)
      add_to_method(method, name, :count) do
        define_method(method) do |*args, &block|
          StatsD.increment(StatsD::Instrument.generate_metric_name(name, self, *args), 1, *metric_options)
          super(*args, &block)
        end
      end
    end
Adds counter instrumentation to a method.

 The metric will be incremented for every call of the instrumented method, no matter
 whether what the method returns, or whether it raises an exception.

 @param method (see #statsd_measure)
 @param name (see #statsd_measure)
 @param metric_options (see #statsd_measure)
 @return [void]