Sha256: 69b59535e2f8e2ddb3d9f87f8a847c696a788b976c0ccf53900c9d841f9b04a6
Contents?: true
Size: 923 Bytes
Versions: 17
Compression:
Stored size: 923 Bytes
Contents
# encoding: utf-8 # This file is distributed under New Relic's license terms. # See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details. DependencyDetection.defer do @name = :sunspot depends_on do defined?(::Sunspot) end executes do ::NewRelic::Agent.logger.info 'Installing Rails Sunspot instrumentation' end executes do ::Sunspot.module_eval do class << self %w(index index!).each do |method| add_method_tracer method, 'SolrClient/Sunspot/index' end add_method_tracer :commit, 'SolrClient/Sunspot/commit' %w[search more_like_this].each do |method| add_method_tracer method, 'SolrClient/Sunspot/query' end %w[remove remove! remove_by_id remove_by_id! remove_all remove_all!].each do |method| add_method_tracer method, 'SolrClient/Sunspot/delete' end end end end end
Version data entries
17 entries across 17 versions & 1 rubygems