flyerhzm/newrelic-rake — pull request #7 by spectator (2013-03-16 01:16:23+00:00)
Title: Force dispatcher and shutdown

I've been investigating why newrelic doesn't receive any data in production-like environment (it's all good in development) and it looks like

* in production we have to explicitly tell what dispatcher we want to use, can be set in two ways: by passing `:dispatcher => :rake` in `manual_start` or specifying ENV variable `NEW_RELIC_DISPATCHER=rake`
* agent has to be shut down when script finished running to send data to newrelic (according to this doc https://newrelic.com/docs/ruby/monitoring-ruby-background-processes-and-daemons)

BTW, did you try in production? Please let me know if you find any issues.