Sha256: 8c4d011738440d57f4ae58898c4d4145bfaa2e4f03bdbe8126d13d42b6f10409
Contents?: true
Size: 979 Bytes
Versions: 39
Compression:
Stored size: 979 Bytes
Contents
# encoding: utf-8 LibraryDetection.defer do @name = :sequel depends_on do defined?(::Sequel) end depends_on do !OneApm::Manager.config[:disable_sequel_instrumentation] end def supported_sequel_version? Sequel.const_defined?( :MAJOR ) && ( Sequel::MAJOR > 3 || Sequel::MAJOR == 3 && Sequel::MINOR >= 37 ) end executes do if supported_sequel_version? OneApm::Manager.logger.info 'Installing Sequel instrumentation' if Sequel::Database.respond_to?(:extension) Sequel::Database.extension :oneapm_instrumentation else OneApm::Manager.logger.warn("Detected Sequel version #{Sequel::VERSION}.") end Sequel.synchronize{Sequel::DATABASES.dup}.each do |db| db.extension :oneapm_instrumentation end Sequel::Model.plugin :oneapm_instrumentation else OneApm::Manager.logger.info "Sequel instrumentation requires at least version 3.37.0." end end end
Version data entries
39 entries across 39 versions & 1 rubygems