Method: NewRelic::Agent#manual_start

Defined in:
lib/new_relic/agent.rb

#manual_start(options = {}) ⇒ Object

Call this to manually start the Agent in situations where the Agent does not auto-start.

When the app environment loads, so does the Agent. However, the Agent will only connect to the service if a web front-end is found. If you want to selectively monitor ruby processes that don’t use web plugins, then call this method in your code and the Agent will fire up and start reporting to the service.

Options are passed in as overrides for values in the newrelic.yml, such as app_name. In addition, the option log will take a logger that will be used instead of the standard file logger. The setting for the newrelic.yml section to use (ie, RAILS_ENV) can be overridden with an :env argument.



411
412
413
414
415
416
# File 'lib/new_relic/agent.rb', line 411

def manual_start(options = {})
  raise 'Options must be a hash' unless Hash === options

  NewRelic::Control.instance.init_plugin({:agent_enabled => true, :sync_startup => true}.merge(options))
  record_api_supportability_metric(:manual_start)
end