Created
October 26, 2009 21:41
-
-
Save eric/219071 to your computer and use it in GitHub Desktop.
NewRelic instrumentation for ThinkingSphinx
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
# NewRelic instrumentation for ThinkingSphinx | |
if defined? ActiveRecord | |
ActiveRecord::Base.class_eval do | |
class << self | |
add_method_tracer :search, 'ActiveRecord/#{self.name}/search' | |
add_method_tracer :search, 'ActiveRecord/search', :push_scope => false | |
add_method_tracer :search, 'ActiveRecord/all', :push_scope => false | |
add_method_tracer :search_count, 'ActiveRecord/#{self.name}/search_count' | |
add_method_tracer :search_count, 'ActiveRecord/search_count', :push_scope => false | |
add_method_tracer :search_count, 'ActiveRecord/all', :push_scope => false | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment