It’s Play Time for the Java Agent

Play logoThe New Relic Java Agent team has received many feature requests to provide better support for the Play framework. And we’re excited to announce that day is here!

New Relic now instruments on the Play 2.x framework (adding to our previous Play 1.x support) to provide you insight into your Java or Scala (2.9 – 2.10) Play applications. Now you can get deeper visibility into how your Play app is performing and what it’s doing across async calls and threads.

Getting Started
If you don’t have one already, create a New Relic account. Then download the New Relic Java agent and add the javaagent command to start the script (output from the ‘play dist’ command).

Plug & Play
When you add New Relic to your Play 2.x application, you’ll see your web transactions organized by controller method / function. You’ll immediately see summary data about what web transactions are called most often, where they’re spending their time, and overall throughput and response time. If your app code throws an error, it will also be displayed under your Error Rate.

Slow loading pages affect your Apdex score. If you include the RUM header and footer in your main.scala.html or other base template, you’ll be able to see how quickly your page renders in your users’ browsers and how your site performs by location.

Transaction Traces Summary screenshot

For the slowest web transactions, New Relic provides a details transaction breakdown that shows where the execution time was spent across threads. The traces optionally include request URL parameters to help you diagnose any problems.

Transaction Traces Details screenshot

Each transaction trace includes the call hierarchy. This is a comprehensive view of trace details that spans across threads within the scope of a transaction. With this information, you can determine whether you have a bottleneck in Netty processing, your Play controller, a database call, or an external REST call. It also becomes a useful tool in visualizing interactivity between asynchronous parts.

In Play 2.x, your asynchronous calls are recorded as part of your web transactions so you have complete view of the activities and duration of your web requests, including time waiting for async activity to be serviced. This async instrumentation applies to Netty (3.5) Request / Response for HTTP, Scala (2.10) Promises and Futures, Akka (2.0 – 2.1) actor calls and Play (2.x) WS API calls. Even if you’re using one of these frameworks independently from Play, you should see greater depth in your Transaction Traces.

Try It Today
Download the latest New Relic Java agent today to take advantage of our Play 2.x framework support. We know you’ll be glad you did!'

View posts by .

Interested in writing for New Relic Blog? Send us a pitch!