Sha256: dfadb0b53fe1373726c8ce30312995cb8f3988c14bd12826cd8f0618e491e20e
Contents?: true
Size: 1.86 KB
Versions: 23
Compression:
Stored size: 1.86 KB
Contents
# Copyright (c) 2016 SolarWinds, LLC. # All rights reserved. module AppOpticsAPM module Inst module ConnectionAdapters module FlavorInitializers def self.mysql AppOpticsAPM.logger.info '[appoptics_apm/loading] Instrumenting activerecord mysqladapter' if AppOpticsAPM::Config[:verbose] # ActiveRecord 3.2 and higher if (::ActiveRecord::VERSION::MAJOR == 3 && ::ActiveRecord::VERSION::MINOR >= 2) || ::ActiveRecord::VERSION::MAJOR == 4 # AbstractMysqlAdapter AppOpticsAPM::Util.send_include(::ActiveRecord::ConnectionAdapters::AbstractMysqlAdapter, ::AppOpticsAPM::Inst::ConnectionAdapters::Utils) AppOpticsAPM::Util.method_alias(::ActiveRecord::ConnectionAdapters::AbstractMysqlAdapter, :execute) # MysqlAdapter AppOpticsAPM::Util.send_include(::ActiveRecord::ConnectionAdapters::MysqlAdapter, ::AppOpticsAPM::Inst::ConnectionAdapters::Utils) AppOpticsAPM::Util.method_alias(::ActiveRecord::ConnectionAdapters::MysqlAdapter, :exec_query) else # ActiveRecord 3.1 and below # MysqlAdapter AppOpticsAPM::Util.send_include(::ActiveRecord::ConnectionAdapters::MysqlAdapter, ::AppOpticsAPM::Inst::ConnectionAdapters::Utils) AppOpticsAPM::Util.method_alias(::ActiveRecord::ConnectionAdapters::MysqlAdapter, :execute) if ::ActiveRecord::VERSION::MAJOR == 3 && ::ActiveRecord::VERSION::MINOR == 1 AppOpticsAPM::Util.method_alias(::ActiveRecord::ConnectionAdapters::MysqlAdapter, :begin_db_transaction) AppOpticsAPM::Util.method_alias(::ActiveRecord::ConnectionAdapters::MysqlAdapter, :exec_delete) end end end end end end end
Version data entries
23 entries across 23 versions & 1 rubygems