def instrument_method_time(method_name, options_or_string = nil)
      options = options_or_string || {}
      options = {name: options} if options.is_a?(String)

      action = :time
      payload = options.fetch(:payload) { {} }
      instrumenter = options.fetch(:instrumenter) { ActiveSupport::Notifications }

      payload[:metric] = options.fetch(:name) {
        if name.nil?
          raise ArgumentError, "For class methods you must provide the full name of the metric."
        else
          "#{::Nunes.class_to_metric(name)}.#{method_name}"
        end
      }

      nunes_wrap_method(method_name, action) do |old_method_name, new_method_name|
        define_method(new_method_name) do |*args, &block|
          instrumenter.instrument(MethodTimeEventName, payload) {
            send(old_method_name, *args, &block)
          }
        end
      end
    end
def instrument_method_time(method_name, options_or_string = nil)
      options = options_or_string || {}
      options = {name: options} if options.is_a?(String)

      action = :time
      payload = options.fetch(:payload) { {} }
      instrumenter = options.fetch(:instrumenter) { ActiveSupport::Notifications }

      payload[:metric] = options.fetch(:name) {
        if name.nil?
          raise ArgumentError, "For class methods you must provide the full name of the metric."
        else
          "#{::Nunes.class_to_metric(name)}.#{method_name}"
        end
      }

      nunes_wrap_method(method_name, action) do |old_method_name, new_method_name|
        define_method(new_method_name) do |*args, &block|
          instrumenter.instrument(MethodTimeEventName, payload) {
            send(old_method_name, *args, &block)
          }
        end
      end
    end
Public: Instrument a method's timing by name.

 method_name - The String or Symbol name of the method.
 options_or_string - The Hash of options or the String metic name.
           :payload - Any items you would like to include with the
                      instrumentation payload.
           :name - The String name of the event and namespace.