module FoundersToolkit::Monitoring::Statsdable

Public Instance Methods

statsd() click to toggle source
# File lib/founders_toolkit/monitoring/statsdable.rb, line 7
def statsd
  Rails.application.config.statsd
end
time(method_name) click to toggle source
Calls superclass method
# File lib/founders_toolkit/monitoring/statsdable.rb, line 12
def time(method_name)
  wrapper = Module.new do
    define_method(method_name) do |*args|
      statsd.time [self.class.name, method_name].join('.') do
        super(*args)
      end
    end
  end
  prepend wrapper
end