Sha256: afdfd40153a4ad0efedcd40a6009e950fe310b22ced513d00a9f6ca4b86ccb67
Contents?: true
Size: 886 Bytes
Versions: 7
Compression:
Stored size: 886 Bytes
Contents
# encoding: utf-8 # This file is distributed under New Relic's license terms. # See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details. require 'new_relic/agent/instrumentation/action_controller_subscriber' DependencyDetection.defer do @name = :rails5_controller depends_on do defined?(::Rails) && ::Rails::VERSION::MAJOR.to_i == 5 end depends_on do defined?(ActionController) && (defined?(ActionController::Base) || defined?(ActionController::API)) end executes do ::NewRelic::Agent.logger.info 'Installing Rails 5 Controller instrumentation' end executes do ActiveSupport.on_load(:action_controller) do |c| c.include NewRelic::Agent::Instrumentation::ControllerInstrumentation end NewRelic::Agent::Instrumentation::ActionControllerSubscriber \ .subscribe(/^process_action.action_controller$/) end end
Version data entries
7 entries across 7 versions & 1 rubygems