Class: NewRelic::Control::Frameworks::Merb

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

Overview

Includes limited support for Merb

Instance Attribute Summary

Attributes included from InstanceMethods

#local_env

Attributes included from LoggingMethods

#log_file

Instance Method Summary collapse

Methods included from ClassMethods

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

Methods included from InstanceMethods

#agent_enabled?, #app, #init_plugin, #start_agent, #to_s

Methods included from LanguageSupport::Control

included

Methods included from LoggingMethods

#find_or_create_file_path, #log, #log!, #log_file_name, #log_path, #log_to_stdout?, #set_log_format!, #set_log_level!, #setup_log, #should_log?

Methods included from Instrumentation

#add_instrumentation, #install_instrumentation, #install_shim, #load_instrumentation_files, #load_samplers

Methods included from ServerMethods

#api_server, #cert_file_path, #convert_to_ip_address, #http_connection, #proxy_server, #resolve_ip_address, #server, #server_from_host

Methods included from Configuration

#[], #[]=, #apdex_t, #app_names, #browser_monitoring_auto_instrument?, #capture_params, #developer_mode?, #disable_backtrace_cleanup?, #disable_serialization=, #disable_serialization?, #dispatcher, #dispatcher_instance_id, #fetch, #has_slow_sql_config?, #license_key, #log_file_path, #merge_defaults, #merge_options, #merge_server_side_config, #monitor_mode?, #multi_threaded?, #post_size_limit, #remove_server_controlled_configs, #send_data_on_exit, #settings, #sync_startup, #use_ssl?, #use_textmate?, #validate_seed, #validate_token, #verify_certificate?

Methods included from Profiling

#profiling=, #profiling?, #profiling_available?

Instance Method Details

#envObject



7
8
9
# File 'lib/new_relic/control/frameworks/merb.rb', line 7

def env
  @env ||= ::Merb.env
end

#init_config(options = {}) ⇒ Object



20
21
22
23
24
25
26
27
# File 'lib/new_relic/control/frameworks/merb.rb', line 20

def init_config options={}
  ::Merb::Plugins.add_rakefiles File.join(newrelic_root,"lib/tasks/all.rb")

  # Merb gives you a Merb::Plugins.config hash...feel free to put your stuff in your piece of it
  ::Merb::Plugins.config[:newrelic] = {
    :config => self
  }
end

#rootObject



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

def root
  ::Merb.root
end

#to_stdout(msg) ⇒ Object



14
15
16
17
18
# File 'lib/new_relic/control/frameworks/merb.rb', line 14

def to_stdout(msg)
  Merb.logger.info("NewRelic ~ " + msg)
rescue => e
  STDOUT.puts "NewRelic ~ " + msg
end