Question

I'm trying to use New Relic's Java Agent 3.1.0 to monitor a Scala based Play 2.2.1 web app, however the NR Web UI doesn't seem to be collecting any data from my server.

I've verified that my newrelic.yml config file is correct, and the Agent appears to hook in as expected when launching the app using the following command (as per the official instructions found here):

root@myserver:/var/www/myapp/target/universal/myapp# ./bin/myapp -J-javaagent:/var/www/myapp/newrelic/newrelic.jar -Dnewrelic.bootstrap_classpath=true

Nov 4, 2013 18:15:41 +1100 NewRelic 1 INFO: Agent is using Logback
Nov 4, 2013 18:15:41 +1100 NewRelic 1 INFO: Loading configuration file "/var/www/myapp/newrelic/./newrelic.yml"
Play server process ID is 11599
[info] play - Application started (Prod)
[info] play - Listening for HTTP on /0:0:0:0:0:0:0:0:9000

After running the above, I can see the name of my app show up within the Applications section of NR's Web UI, so my app is certainly pinging the service, however I don't see any actual data within the dashboards.

My newrelic_agent.log file is as follows:

Nov 4, 2013 17:39:20 +1100 NewRelic 1 INFO: Writing to New Relic log file: /var/www/myapp/newrelic/logs/newrelic_agent.log
Nov 4, 2013 17:39:20 +1100 NewRelic 1 INFO: Agent Host: myserver IP: <snipped - it had my IP here!>
Nov 4, 2013 17:39:24 +1100 NewRelic 1 ERROR: com/caucho/vfs/WriteStream is marked as a weaved class, but no methods are matched to be weaved.
Nov 4, 2013 17:39:36 +1100 NewRelic 1 INFO: Configured to connect to New Relic at collector.newrelic.com:443
Nov 4, 2013 17:39:36 +1100 NewRelic 1 INFO: Setting audit_mode to false
Nov 4, 2013 17:39:36 +1100 NewRelic 1 INFO: Setting protocol to "https"
Nov 4, 2013 17:39:37 +1100 NewRelic 1 INFO: Configuration file is /var/www/myapp/newrelic/./newrelic.yml
Nov 4, 2013 17:39:37 +1100 NewRelic 1 INFO: New Relic Agent v3.1.0 has started
Nov 4, 2013 17:39:37 +1100 NewRelic 1 INFO: Java version: 1.7.0_45
Nov 4, 2013 17:39:37 +1100 NewRelic 1 INFO: The newrelic.bootstrap_classpath system property is deprecated.
Nov 4, 2013 17:39:37 +1100 NewRelic 1 INFO: Agent class loader is null which typically means the agent is loaded by the bootstrap class loader.
Nov 4, 2013 17:39:44 +1100 NewRelic 9 INFO: Collector redirection to collector-9.newrelic.com:443
Nov 4, 2013 17:39:45 +1100 NewRelic 9 INFO: Agent run id: 404659456
Nov 4, 2013 17:39:45 +1100 NewRelic 9 INFO: Agent 11288@myserver/My App connected to collector.newrelic.com:443
Nov 4, 2013 17:39:45 +1100 NewRelic 9 INFO: Real user monitoring is enabled with auto instrumentation for application "My App"
Nov 4, 2013 17:39:45 +1100 NewRelic 9 INFO: Errors will be sent to New Relic for Mealdrum

Can anybody offer any suggestions? Thanks!

Was it helpful?

Solution 2

By working directly in a support ticket, we discovered yet another possible issue with play 2.2 and New Relic's instrumentation and we will be fixing that by releasing version 3.2 of our Java agent. It should be out shortly after December 2nd, 2013, and will show up on the release notes page.

OTHER TIPS

While this log shows a clean agent startup, it's possible that you're the victim of an issue with the 3.1.0 agent that interfered with New Relic's instrumentation of Play 2 apps. Java Agent 3.1.1 resolves this. Release notes are on the docs site: https://docs.newrelic.com/docs/releases/java

I recently noticed there are no update instructions anywhere on our docs site but it's dead easy: replace your newrelic.jar and nothing else and restart your JVM.

After you've got 3.1.1 installed and your JVM restarted, metrics should report correctly. If not, I'd open a ticket at support.newrelic.com so we can takea look at detailed logs.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top