Sha256: 712cf905a4d59e5b1b0a8f88d7278317bbc57766cf5378fb6583ee4ef5bc6475
Contents?: true
Size: 1.15 KB
Versions: 2
Compression:
Stored size: 1.15 KB
Contents
# This file is distributed under New Relic's license terms. # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. # frozen_string_literal: true DependencyDetection.defer do @name = :sunspot depends_on do defined?(::Sunspot) end executes do ::NewRelic::Agent.logger.info('Installing Rails Sunspot instrumentation') deprecation_msg = 'The instrumentation for Sunspot is deprecated. ' \ 'It will be removed in version 9.0.0.' ::NewRelic::Agent.logger.log_once( :warn, :deprecated_sunspot, deprecation_msg ) 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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
newrelic_rpm-8.13.1 | lib/new_relic/agent/instrumentation/sunspot.rb |
newrelic_rpm-8.13.0 | lib/new_relic/agent/instrumentation/sunspot.rb |