# encoding: utf-8 require 'one_apm/inst/rails4/action_view_subscriber' LibraryDetection.defer do @name = :rails4_view depends_on do defined?(::Rails) && ::Rails::VERSION::MAJOR.to_i == 4 end depends_on do !OneApm::Agent.config[:disable_view_instrumentation] && !OneApm::Agent::Instrumentation::ActionViewSubscriber.subscribed? end executes do ::OneApm::Agent.logger.info 'Installing Rails 4 view instrumentation' end executes do OneApm::Agent::Instrumentation::ActionViewSubscriber.subscribe(/render_.+\.action_view$/) end end