NewRelic integration for Chore.
Add this line to your application's Gemfile:
gem 'chore-new_relic'
And then execute:
$ bundle
Or install it yourself as:
$ gem install chore-new_relic
Configure NewRelic according to their documentation.
If you're using Rails, you're done! If not, there's one additional step.
Add the following require statements to your application (order is important due to the way NewRelic handles plugin registration).
require 'chore/new_relic'
require 'newrelic_rpm'
The plugin uses your application's NewRelic configuration, and will begin sending custom events for your Chore jobs. You should begin seeing data show up under "Non-Web Transactions" once this is setup.
Note that using Chore's ForkedWorkerStrategy
is incompatible with the vanilla version of rpm. There are issues with how the child processes report data back up to their parents and this can sometimes cause the child workers to die.
Here's Tapjoy's fork of the rpm
that fixes the issues but is currently unmaintained (since Tapjoy no longer uses the forked worker strategy) - https://github.com/Tapjoy/rpm. The relevant PRs commits are in Tapjoy/rpm#3 & Tapjoy/rpm#7.