Sha256: 40bd814cb5cee6fd49262fa5adaf5243bc444bbe3f269360c1423e21232ed525

Contents?: true

Size: 776 Bytes

Versions: 39

Compression:

Stored size: 776 Bytes

Contents

# encoding: utf-8

LibraryDetection.defer do
  @name = :sunspot

  depends_on do
    defined?(::Sunspot)
  end

  executes do
    OneApm::Manager.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

39 entries across 39 versions & 1 rubygems

Version Path
oneapm_rpm-1.4.2 lib/one_apm/inst/3rd/sunspot.rb
oneapm_rpm-1.4.1 lib/one_apm/inst/3rd/sunspot.rb
oneapm_rpm-1.4.0 lib/one_apm/inst/3rd/sunspot.rb
oneapm_rpm-1.3.7 lib/one_apm/inst/3rd/sunspot.rb
oneapm_rpm-1.3.7.rc1 lib/one_apm/inst/3rd/sunspot.rb
oneapm_rpm-1.3.6 lib/one_apm/inst/3rd/sunspot.rb
oneapm_rpm-1.3.6.rc1 lib/one_apm/inst/3rd/sunspot.rb
oneapm_rpm-1.3.5 lib/one_apm/inst/3rd/sunspot.rb
oneapm_rpm-1.3.5.rc1 lib/one_apm/inst/3rd/sunspot.rb
oneapm_rpm-1.3.4 lib/one_apm/inst/3rd/sunspot.rb
oneapm_rpm-1.3.4.rc1 lib/one_apm/inst/3rd/sunspot.rb
oneapm_rpm-1.3.3 lib/one_apm/inst/3rd/sunspot.rb
oneapm_rpm-1.3.3.rc1 lib/one_apm/inst/3rd/sunspot.rb
oneapm_rpm-1.3.2 lib/one_apm/inst/3rd/sunspot.rb
oneapm_rpm-1.3.2.rc1 lib/one_apm/inst/3rd/sunspot.rb
oneapm_rpm-1.3.1 lib/one_apm/inst/3rd/sunspot.rb
oneapm_rpm-1.3.1.rc1 lib/one_apm/inst/3rd/sunspot.rb
oneapm_rpm-1.3.0 lib/one_apm/inst/3rd/sunspot.rb
oneapm_rpm-1.3.0.rc1 lib/one_apm/inst/3rd/sunspot.rb
oneapm_rpm-1.2.9 lib/one_apm/inst/3rd/sunspot.rb