New relic on Heroku, how to get it to work? New relic on Heroku, how to get it to work? heroku heroku

New relic on Heroku, how to get it to work?


You should be able to use New Relic through the heroku interface without creating a separate account.

Once you're app is deployed with the agent, and has gotten a few requests you should start seeing data in the interface.

The agent does create a log (I believe you can get output via heroku logs) so that might also help you troubleshoot it.

I'd suggest opening a support ticket on http://support.newrelic.com.


This could be happening because your hosted application does not have the right credentials (e.g license key) provided by newrelic.

Did you update the default newrelic.yml file obtained from the 'newrelic.jar' extract? You can obtain your app's license key in the account settings menu when accessing newrelic through the heroku interface (your 1st screenshot). Then set the following config vars on heroku;

NEW_RELIC_LICENSE_KEY="your license key"NEW_RELIC_APP_NAME="your app name"

Don't forget to set the appropriate RACK_ENV config var too e.g RACK_ENV=production

Then update your newrelic.yml file by finding and changing the following lines;

license_key: '<%= license_key %>' to license_key: '<%= ENV["NEW_RELIC_LICENSE_KEY"] %>'

app_name: My Application to app_name: '<%= ENV["NEW_RELIC_APP_NAME"] %>'

app_name: My Application (Development) to app_name: '<%= ENV["NEW_RELIC_APP_NAME"] (Development) %>'

app_name: My Application (Staging) to app_name: '<%= ENV["NEW_RELIC_APP_NAME"] (Staging) %>'

Here is a sample newrelic.yml file with environment vars set.

You should be able to access new relic from heroku interface after you've pushed your changes.


Check whether you find anything in the heroku logs with heroku logs. Also, you can increase the log level of new relic by setting the system properties newrelic.config.log_level and newrelic.debug. Also note that after creation of a new account or after password changes it takes a while until the changed credentials are propagated.

To set a finer log log level:

$ heroku config:set JAVA_OPTS=”-Xmx384m -Xss512k -XX:+UseCompressedOops -Dfile.encoding=UTF-8 -javaagent:target/staged/newrelic-agent-2.20.0.jar -Dnewrelic.bootstrap_classpath=true -Dnewrelic.config.file=./conf/newrelic.yml newrelic.config.log_level=finer newrelic.debug=true”

Make sure to not run with that in production. It produces quite a lot of logs.

See our blog post about how to setup New Relic with Play 2.1/Scala on Heroku: http://techblog.nezasa.com/2013/08/performance-monitoring-of-nezasa-with.html