BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News NewRelic RPM 2 Adds Java Support for Performance Monitoring

NewRelic RPM 2 Adds Java Support for Performance Monitoring

This item in japanese

Bookmarks

NewRelic RPM is a very popular performance monitoring solution in the Ruby on Rails space. The latest release, RPM 2, is now available and brings RPM's features to the Java applications.

InfoQ talked to NewRelic's Lew Cirne about the new release.

InfoQ: How does the Java support for NewRelic RPM work?

New Relic RPM can collect information from different sources. Since it was designed for production monitoring, as well as deep diagnosis, the key is to ensure that the information it collects is relevant and that the monitoring and collecting of information does not add overhead to the performance of the application itself.
JMX, for example, provides pretty good summary metrics, but is too shallow for adequate root cause diagnosis. We use official APIs where they exist and we complement this data with byte code instrumentation to gather deep information that enables rapid troubleshooting. For example, RPM automatically gathers SQL explain information for slow database queries. This can be extremely valuable for the teams responsible for monitoring and diagnosing issues as many performance problems are database related.

InfoQ: What's your experience with bytecode instrumentation? Have you encountered any problems with other libraries that instrument bytecode?

We use official APIs where they exist and we also use byte code instrumentation to instrument app server specific methods. RPM instruments classes at load time, and has no issues co-residing with other tools that modify bytecode, such as AOP libraries.

InfoQ: What platforms and systems does your Java agent support?

New Relic RPM supports different frameworks including Spring, Grails, and JEE. RPM can monitor standard JEE components such as Servlets, EJBs, JDBC, Hibernate, Web Service invocations, POJO’s, JSPs, and more. It can also monitor applications deployed on the Spring stack.
Additionally, RPM monitors web applications deployed on WebSphere, WebLogic, JBoss, Tomcat, Jetty and Glassfish.

InfoQ: Is there a way for 3rd parties to extend NewRelic to support new web frameworks?

RPM was designed to allow for easy integration of third party tools and metrics. Using RPM's API, customers can integrate data from other sources. We also offer a REST API that allows our customers and third party software vendors to integrate RPM application performance data into their solutions. Companies like Rightscale have been using this API for some time now.

InfoQ: NewRelic now also supports monitoring JRuby applications, in addition to MRI. What was necessary to support JRuby?

JRuby support is relatively straightforward. There are some subtle differences in Ruby and JRuby methods, which RPM uses to collect information. Once we identified and allowed for the differences, automatic instrumentation was straightforward for RPM, given its architectural flexibility.

InfoQ: Are the JRuby and the Java support related?

RPM is unique among application performance management tools in that it provides one UI for monitoring Ruby/JRuby and Java. There is one agent for Ruby/JRuby and one agent for Java. Our Ruby agent and Java agent both work in much the same way and, as mentioned, both report data to the same console.
For customers running a Rails application in JRuby, we recommend they use our Ruby agent, which is fully compatible in this environment, and will offer a more relevant set of metrics.

InfoQ: NewRelic also supports Ruby 1.9. Do you see Ruby 1.9 adopted among your customers?

One of the benefits of our SaaS approach is visibility into literally thousands of applications in production, and therefore have excellent knowledge of what platforms and runtime versions our customers are adopting. We periodically share key observations on our RailsLab site (http://railslab.newrelic.com/2009/06/11/the-state-of-the-stack-a-ruby-on-rails-benchmarking-report-10-june-2009) in our “State of the Stack” Articles.

Based on this information, we are seeing relatively low penetration of Ruby 1.9 in our customer base, but we like to stay ahead of the curve. When our customers move a major platform or runtime upgrade (be it a release of Ruby, JRuby, Java, Rails, Spring, Grails, etc) we make best efforts to support that before the market generally adopts it in production.

NewRelic RPM is available at several levels of pricing, starting with the free of charge RPM Lite. Special offers are available for EngineYard and RightScale customers.

Seeing NewRelic RPM's features, what do you currently use for performance monitoring in Java?

Rate this Article

Adoption
Style

BT