Class: NewRelic::Control::Rails3
Overview
Control subclass instantiated when Rails is detected. Contains Rails specific configuration, instrumentation, environment values, etc.
Instance Attribute Summary
#local_env, #log_file
Instance Method Summary
collapse
#[], #[]=, #add_instrumentation, #agent_enabled?, #apdex_t, #api_server, #app, #app_names, #capture_params, #developer_mode?, #dispatcher, #dispatcher_instance_id, #fetch, format_message, #http_connection, #init_plugin, #install_instrumentation, instance, #license_key, #load_samplers, #log, #log!, #monitor_mode?, #multi_threaded?, #post_size_limit, #profiling=, #profiling?, #profiling_available?, #proxy_server, #server, #server_from_host, #settings, #start_agent, #sync_startup, #to_s, #use_ssl?, #use_textmate?, #validate_seed, #validate_token, #verify_certificate?
Instance Method Details
#env ⇒ Object
6
7
8
|
# File 'lib/new_relic/control/rails3.rb', line 6
def env
@env ||= ::Rails.env.to_s
end
|
#init_config(options = {}) ⇒ Object
39
40
41
42
43
44
45
46
47
48
|
# File 'lib/new_relic/control/rails3.rb', line 39
def init_config(options={})
rails_config=options[:config]
if !agent_enabled?
logger.info "New Relic Agent not running."
else
logger.info "Starting the New Relic Agent."
end
end
|
#log_path ⇒ Object
27
28
29
|
# File 'lib/new_relic/control/rails3.rb', line 27
def log_path
@log_path ||= File.expand_path(File.dirname(base_log_file))
end
|
#logger ⇒ Object
14
15
16
|
# File 'lib/new_relic/control/rails3.rb', line 14
def logger
::Rails.logger
end
|
#root ⇒ Object
10
11
12
|
# File 'lib/new_relic/control/rails3.rb', line 10
def root
@root ||= Rails.root.to_s
end
|
#vendor_root ⇒ Object
31
32
33
|
# File 'lib/new_relic/control/rails3.rb', line 31
def vendor_root
@vendor_root ||= File.join(root,'vendor','rails')
end
|
#version ⇒ Object
35
36
37
|
# File 'lib/new_relic/control/rails3.rb', line 35
def version
@rails_version ||= NewRelic::VersionNumber.new(::Rails::VERSION::STRING)
end
|