Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
NewRelic instrument for rake task
branch: master
Failed to load latest commit information.
lib Bumping version to 1.4.1
.gitignore Bumping version to 1.4.1 Test suite is using TestUnit.
Gemfile Add mocha.
MIT_LICENSE add documents
Rakefile Bootstrap test suite + very simple test.
newrelic-rake.gemspec adding dependency to newrelic_rpm


NewRelic instrument for rake task.


Add this line to your application's Gemfile:

gem 'newrelic-rake'

And then execute:

$ bundle

Or install it yourself as:

$ gem install newrelic-rake


There is usually nothing to do for rake tasks in rails that depend on :environment, monitoring of these should just work.

Rake files need to require newrelic-rake and start the newrelic agent before executing tasks to monitor:

require 'newrelic-rake'

These steps happen automatically in Rails' :environment task if you use Bundler.require in your application.rb.

Install exit handler

In general, newrelic gem will automatically install exit handler. But if you have sinatra gem in Gemfile.lock, you have to manually install exit handler

at_exit { NewRelic::Agent.shutdown  }

Authors and Contributors


Please fork and contribute, any help in making this project better is appreciated!

This project is a member of the OSS Manifesto.


Copyright @ 2012 - 2013 Richard Huang. See MIT-LICENSE for details

Something went wrong with that request. Please try again.