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:
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.