Skip to content

Instantly share code, notes, and snippets.

@pbonnell
Created April 6, 2012 21:36
Show Gist options
  • Save pbonnell/2323124 to your computer and use it in GitHub Desktop.
Save pbonnell/2323124 to your computer and use it in GitHub Desktop.
expensive to put tracers on all class methods ?
if defined?(NewRelic)
Sircle.class_eval do
class << self
include NewRelic::Agent::MethodTracer
# all methods defined in sircle.rb
self.methods(false).each do |method|
add_method_tracer method.to_s, "Custom/Sircle/#{method}"
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment