Play Framework (7) – Application Monitor Tool: New Relic

I want to find a way to make monitoring Play Application as simple as possible. Now I find one tool, named “New Relic” which already supports Play Framework. Here is a summary about how to involve New Relic to your application.

  • Step1: you need to login New Relic. (you need to see monitor result on your own account)
  • Step2: you need to download java agent.
    • please note: you’d better unzip this agent’s zip to /path/to/appRoot/
  • Step3: you need to use “activator dist” to re-build your application. Please note: third command: if you want to make it simple, you just need to add “-J-javaagent” to your command. Others are just configure JVM. If you want to configure New Relic, you just go to newrelic/newrelic.yml to modify your application’s name or others.
    • activator clean dist && unzip target/universal/*.zip
    • cd target/universal/YourUnzipFolder/
    • ./bin/YourApplicationName -J-javaagent:../../../newrelic/newrelic.jar -Duser.timezone=GMT -Dhttp.port=9081 -J-Xms4096m -J-Xmx4096m -J-Xmn2048m
  • Step4: done. you just need to go back to your New Relic Account to see the result. If you don’t know where to see your result. You can go to /newrelic/logs/newrelic_agent.log to see its log, like “Reporting to:″. Of course, different application has different id.

One thought on “Play Framework (7) – Application Monitor Tool: New Relic

  1. Pingback: Play application performance optimization | Play Harder, Work Harder

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s