So I have New Relic set up on my Rails app, which I run both locally for development and which I deploy to Heroku.
However, the New Relic dashboard shows data from my local setup and not from Heroku. I know because the data I can see corresponds to what's happening on the local environment, and on the new relic dashboard the listed servers includes the hostname of my local machine.
How do I make sure New Relic monitors the heroku environment instead?
New Relic is setup in my app this way:
As per comments, check to make sure you config/newrelic.yml
file is monitoring a production application.
Set all newrelic keys only on heroku, not on local app. You only need a reference to: NEW_RELIC_LICENSE_KEY in all places. That constant should have nothing to read locally, and only read the heroku configs in production.
Replace any local license keys with license_key: '<%= ENV["NEW_RELIC_LICENSE_KEY"] %>'
and turn development monitor_mode
to false
and production monitor_mode
to true.
All: read comments above for further details if this is unclear.