Sebastian Medina
Sebastian Medina

Reputation: 15

New Relic APM Heroku add-on for Ruby on Rails installation problem

I've been trying to install New Relic's agent for my Heroku deployed app, I follow all steps included in New Relic's documentation including:

heroku config:set NEW_RELIC_APP_NAME='Your Application Name'

and after that putting gem 'newrelic_rpm' in my Gemfile.

After performing a bundle install and pushing changes with git push heroku master, it seems that changes made in the Gemfile are not actually going to heroku. What can be done about this? if I add the gem via heroku bash run it is again not seen after a dyno reset.

Upvotes: 1

Views: 339

Answers (2)

stevec
stevec

Reputation: 52308

It's easy to think you have to do more than is actually necessary, but the Heroku addon actually takes care of a lot of configuration for you. Don't get lost in the documentation - the whole setup process should only take a minute or two.


Here's a detailed explanation.

To summarise:

  1. heroku addons:create newrelic:wayne (wayne is the free plan, for other plans, see here)
  2. Add gem 'newrelic_rpm' to Gemfile and bundle install
  3. Run this to let New Relic know what to call your app (replacing 'Your Application Name' with whatever you want your app to be called in the New Relic dashboard)
heroku config:set NEW_RELIC_APP_NAME='Your Application Name'
  1. Restart your dyno with heroku restart
  2. Visit at least a few pages of your app so that there is some traffic to measure
  3. Visit the Heroku dashboard, select your application, and under the ‘Overview’ tab, look for the New Relic APM link. Click it to go through to the New Relic dashboard. Find your app, click on it. You'll then see your app's metrics.

enter image description here

Upvotes: 1

Hesham Youssef
Hesham Youssef

Reputation: 198

I think you need to add the New Relic add-on on Heroku, either from the dashboard through the Configure Add-ons option, or by running

heroku addons:create newrelic:wayne

where wayne is the plan level.

You can read more about it here: Install the New Relic add-on

Upvotes: 0

Related Questions