class NewRelic::Control::Frameworks::Rails3

Control subclass instantiated when Rails is detected. Contains Rails 3.0+ specific configuration, instrumentation, environment values, etc. Many methods are inherited from the NewRelic::Control::Frameworks::Rails class, where the two do not differ

Public Instance Methods

env() click to toggle source
# File lib/new_relic/control/frameworks/rails3.rb, line 16
def env
  @env ||= (ENV['NEW_RELIC_ENV'] || ::Rails.env.to_s)
end
rails_root() click to toggle source
# File lib/new_relic/control/frameworks/rails3.rb, line 20
def rails_root
  ::Rails.root.to_s
end
vendor_root() click to toggle source
# File lib/new_relic/control/frameworks/rails3.rb, line 24
def vendor_root
  @vendor_root ||= File.join(root, 'vendor', 'rails')
end
version() click to toggle source
# File lib/new_relic/control/frameworks/rails3.rb, line 28
def version
  @rails_version ||= Gem::Version.new(::Rails::VERSION::STRING)
end

Protected Instance Methods

install_shim() click to toggle source
# File lib/new_relic/control/frameworks/rails3.rb, line 34
def install_shim
  super
  ActiveSupport.on_load(:action_controller) do
    include NewRelic::Agent::Instrumentation::ControllerInstrumentation::Shim
  end
end