ActiveBlog

New Relic App Monitoring in Stackato
by Troy Topnik

Troy Topnik, October 26, 2011
New Relic Monitoring on Stackato

As Diane Mueller mentioned in a post back in August, we've partnered with New Relic to provide application-level monitoring of apps running on Stackato.

But I've been asked to elaborate a little more about what New Relic actually does, and why we think this is an important addition to any application deployment environment. Here goes...

Sure, the server is up but...

Server monitoring at the most rudimentary level is relatively easy. You can check to make sure a web server is processing HTTP requests with periodic checks or by listening to some predefined "heartbeat" emitted by the server. This is not the type of monitoring we're talking about.

What New Relic does is actually closer to what we've done for Perl with the Hotspot Analyzer in the PDK or the Code Profiling in Komodo IDE 7, but it does it in real time on the web server by using agents (extension modules) with deep hooks into the language and framework to give you a more complete picture of where an application is spending CPU cycles.

It tells you if your web server is up of course, but it tells you a lot more.

Getting deep into the application

New Relic agents are libraries that you install on the web server and load into your application, usually before any other code is loaded. The agent runs in-process and captures detailed measurements of application performance and transmits those metrics to newrelic.com where they can be analyzed and investigated.

It takes a lot of language and framework expertise to get at the important information, and New Relic has done an excellent job with agents for Java, Ruby, PHP, .NET and now Python.

Too many features to list

New Relic monitoring a Django app

So what kind of metrics can you monitor? Probably more than you currently care about, but once you've had a look at what's available and examined some real data, you'll probably expand that list:

  • requests per minute
  • % error rate
  • average page load time for actual end users (with Real User Monitoring - see below)
  • average page views per minute
  • average transaction completion time
  • database operation timing
  • % of page load time by function
  • which browsers are being used to access the app
  • the throughput and page load times for those different browsers
  • where your users are geographically
  • page load times by country/state

Page load time? How?

Modern web applications do a lot on the client side, and server-only monitoring solutions wouldn't cover the end user experience very well. New Relic has implemented something called Real User Monitoring which collects performance statistics right from the user's browser.

The agent injects JavaScript libraries (based on Steve Soulder's work) into application-generated pages. These libraries collect data on load times in the browser and report the measurements to newrelic.com where they are correlated with the server-side statistics.

The result is broad and sometimes surprising look at how your code changes affect end users' page views on different browsers.

The breadth of data being reported would be overwhelming if it weren't for the excellent UI that makes these measurements comprehensible. One of the ways New Relic has simplified things is to provide reporting based on the Apdex metric. You can even set up alerts based on this, so you'll be notified if the response time for end users falls below a certain threshold.

Python support

We've had the pleasure of working with Graham Dumpleton on getting the new Python agent working smoothly in Stackato. The package is available now via PyPM, and we've got some preliminary documentation on getting this set up. Graham has also put together a page on the New Relic Support site, with slightly different instructions. There's currently "more than one way to do it", but we'll narrow it down to the best recommended configuration as both the New Relic Python agent and Stackato itself get nearer to GA release.

Get started

As you may have seen, the Stackato Beta is now fully open. Getting access to a Stackato micro cloud VM or our developer sandbox is now just a matter of signing in to the community site with your ActiveState account. Eventually Stackato users will be automatically given a New Relic account, but for now, feel free to sign up for their free trial. Try out the service with Stackato and see some of the user experience metrics you've been missing.

Subscribe to ActiveState Blogs by Email

Share this post:

Category: stackato
About the Author: RSS

Troy Topnik is ActiveState's technical writer. After joining ActiveState in 2001 as a "Customer Relationship Representative" (AKA Tech Support), Troy went on to lead the PureMessage Enterprise Support team before moving on to a technical writing role in 2004. His talent for describing software for new users stems from his difficulty understanding things that developers find obvious. He has a Bachelor of Music from the University of Victoria.