Heroku is a Platform as a Service (PaaS) solution for hosting web applications in various agent languages, including Java. With New Relic, you can extend Heroku with metrics from APM or browser monitoring.
If you use Scala, see Java agent Scala procedures for Heroku.
After you ensure that you meet the requirements, enable the New Relic agent add-on in Heroku.
- Log in to your Heroku account.
- From the APM Add-On Page, select a subscription plan.
- Select Install APM, and then select your target app from the dropdown.
Installing the add-on automatically creates a New Relic account and configures access for Heroku servers.
After you enable the New Relic agent add-on, pass the
javaagent flag to the
java process and provide the path to the jar file by editing your
After you provide the path to the jar file, configure your Heroku environment for New Relic, depending on your platform:
After you configure your Heroku environment for New Relic, push your changes and open the app to monitor it with New Relic.
Push your changes to the dyno with this Heroku toolbelt command:
git add . git commit -m 'YOUR COMMIT MESSAGE' git push heroku master
Open your app in your browser with this Heroku toolbelt command:heroku open
Generate some traffic to your app and wait a few minutes.
Check your app's performance in Heroku by selecting your app and then selecting the New Relic add-on.
If no data appears or if you have problems, follow the troubleshooting tips.
Here are some tips to help you troubleshoot:
- If you don't see the New Relic add-on after you generate traffic, go to Heroku, select Find More Add Ons, and add the APM add-on.
- If no data appears after waiting a few minutes, follow the troubleshooting procedures for Heroku (Java).