Skip to content

Instantly share code, notes, and snippets.

@gilles
Created January 19, 2011 17:13
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save gilles/786462 to your computer and use it in GitHub Desktop.
Save gilles/786462 to your computer and use it in GitHub Desktop.
Trace extra methods in rpm, add the file as a rails initializer
#trace mongo in RPM
Mongo::Collection.class_eval do
include NewRelic::Agent::MethodTracer
add_method_tracer :find
add_method_tracer :find_one
add_method_tracer :find_and_modify
add_method_tracer :update
add_method_tracer :insert
add_method_tracer :save
add_method_tracer :remove
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment