Created
April 6, 2012 21:36
-
-
Save pbonnell/2323124 to your computer and use it in GitHub Desktop.
expensive to put tracers on all class methods ?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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