Sha256: c70029a02afb9893946d7fb409f7e82262c518a4e84641a9b075519da42d3ddf
Contents?: true
Size: 1.28 KB
Versions: 35
Compression:
Stored size: 1.28 KB
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' module NewRelic module Agent module Instrumentation module Rails4 module ActionController def self.newrelic_write_attr(attr_name, value) # :nodoc: write_inheritable_attribute(attr_name, value) end def self.newrelic_read_attr(attr_name) # :nodoc: read_inheritable_attribute(attr_name) end end end end end end DependencyDetection.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 ::NewRelic::Agent.logger.info 'Installing Rails 4 Controller instrumentation' end executes do class ActionController::Base include NewRelic::Agent::Instrumentation::ControllerInstrumentation include NewRelic::Agent::Instrumentation::Rails4::ActionController end NewRelic::Agent::Instrumentation::ActionControllerSubscriber \ .subscribe(/^process_action.action_controller$/) end end
Version data entries
35 entries across 35 versions & 1 rubygems