Sha256: ab88b8caefc97ed6f775cfaa71a276f9de4ad88a2ecc7fc3d11775709b7afdcf

Contents?: true

Size: 655 Bytes

Versions: 3

Compression:

Stored size: 655 Bytes

Contents

# encoding: utf-8
require 'one_apm/inst/rails4/action_controller_subscriber'


LibraryDetection.defer do
  @name = :rails4_controller

  depends_on do
    defined?(::Rails) && ::Rails::VERSION::MAJOR.to_i == 4
  end

  depends_on do
    defined?(ActionController) && defined?(ActionController::Base)
  end

  executes do
    ::OneApm::Agent.logger.info 'Installing Rails 4 Controller instrumentation'
  end

  executes do
    class ActionController::Base
      include OneApm::Agent::Instrumentation::TransactionBase
    end
    OneApm::Agent::Instrumentation::ActionControllerSubscriber \
      .subscribe(/^process_action.action_controller$/)
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
oneapm_rpm-1.1.2 lib/one_apm/inst/rails4/action_controller.rb
oneapm_rpm-1.1.1 lib/one_apm/inst/rails4/action_controller.rb
oneapm_rpm-1.1.0 lib/one_apm/inst/rails4/action_controller.rb