Class: NewRelic::Control::Frameworks::Ruby

Inherits:
NewRelic::Control show all
Defined in:
lib/new_relic/control/frameworks/ruby.rb

Overview

A control used when no framework is detected - the default.

Direct Known Subclasses

External, Grape, Rails, Roda, Sinatra

Instance Attribute Summary

Attributes included from InstanceMethods

#local_env

Instance Method Summary collapse

Methods inherited from NewRelic::Control

#rails_32_deprecation

Methods included from ClassMethods

#instance, #load_framework_class, #load_test_framework, #local_env, #new_instance, #newrelic_root, #reset

Methods included from InstanceMethods

#[], #app, #configure_agent, #determine_env, #dispatcher, #framework, #handle_invalid_security_settings, #init_plugin, #newrelic_root, #security_settings_valid?, #settings, #start_agent

Methods included from Instrumentation

#add_instrumentation, #install_instrumentation, #install_shim, #load_instrumentation_files

Methods included from ServerMethods

#api_server, #server, #server_from_host

Instance Method Details

#envObject



10
11
12
13
# File 'lib/new_relic/control/frameworks/ruby.rb', line 10

def env
  @env ||= ENV['NEW_RELIC_ENV'] || ENV['RUBY_ENV'] || ENV['RAILS_ENV'] ||
    ENV['APP_ENV'] || ENV['RACK_ENV'] || 'development'
end

#init_config(options = {}) ⇒ Object



19
20
# File 'lib/new_relic/control/frameworks/ruby.rb', line 19

def init_config(options = {})
end

#rootObject



15
16
17
# File 'lib/new_relic/control/frameworks/ruby.rb', line 15

def root
  @root ||= ENV['APP_ROOT'] || '.'
end