Newrelic agent already handles at_exit flushing and installing extra at_exit handler causes bugs with ruby's exit code handling. https://bugs.ruby-lang.org/issues/5218 This issue can be reproduced by: * include newrelic-rake gem in your project * run application testsuite (Rspec) that is expected to fail `$ rake` * inspect exit code `$ echo $?` * expected exit code should be non-zero (but is actually zero) http://www.davekonopka.com/2013/rspec-exit-code.html
Older versions of newrelic_rpm required setting the dispatcher for the agent to report. This hasn't been the case for most of the last year, though. Setting the dispatcher on manual_start wouldn't be a problem except DelayedJob (and potentially Resque) are 1) run through rake and 2) rely on the background framework being detected as dispatcher to function properly. Explicitly setting the `:dispatcher => :rake` short-cuts that detection, and things break. Removing that dispatcher will only make processes on the environment page not list 'rake' preceding the hostname, which is a bummer, but better than DJ clients missing instrumentation.
…nt only once