Created
February 11, 2011 15:02
-
-
Save outoftime/822461 to your computer and use it in GitHub Desktop.
Add NewRelic execution traces to Mongoid
This file contains hidden or 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 | |
module Mongoid | |
class Collection | |
(%w(find find_one map_reduce) + Collections::Operations::PROXIED - ['<<']).uniq.each do |method| | |
add_method_tracer method, "MongoDB/\#{@klass}##{method}" | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment