New Relic Provides Grails Support


We are excited to announce Grails support in the Java Agent! Grails is a web application framework that uses the Groovy programming language on the JVM. Grails is heavily inspired by Ruby on Rails. It provides many convenience features, and an emphasis on convention over configuration, so that you can build your app quickly.

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 flag.

Grails Web Transactions

With the new Grails support, web transactions are named by the controller route, followed by the action. Take a look at the most time consuming transactions displayed below for the sample Pet Clinic application.


[click to enlarge]

This page shows that the most amount of time is spent in the vets action of the clinic controller. Drilling into this action, we can see the major methods called within the transaction. This includes time spent in Groovy filters and database queries.


[click to enlarge]

Even more detail can be found in the transaction traces which are the slowest instances of the clinic/vets transaction. Below shows the SQL executed during one instance of the clinic/vets transaction.


[click to enlarge]

Instrumenting Additional Groovy Methods

Do you want to instrument some additional Groovy methods? New Relic’s custom instrumentation can help. Use Trace annotations on the Groovy methods you would like New Relic to track. Use the New Relic API to notice specific errors being thrown within your Grails application. You can also manually instrument Groovy Server Pages and then see browser timing information in New Relic.

Try It Today

Download the latest New Relic agent today and take advantage of our Grails support!

View posts by .

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