Use Your Existing Newrelic Key on Heroku

We had an existing Newrelic account and wanted to track some other apps on Heroku. I thought getting our Newrelic key into the Heroku apps would be the easiest solution. Here’s what I did.

Add this to Gemfile:

gem ‘newrelic_rpm’


Add a Heroku config:

heroku config:add NEWRELIC_LICENSE_KEY


Add this to environment.rb or a lib somewhere:


NewRelic::Control.instance[‘license_key’] = ENV[‘NEWRELIC_LICENSE_KEY’]





I have a feeling I didn’t do this the easiest way but it works. Or that I’m breaking some terms of service.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: