“Apps Talk” with New Relic

This post was adapted from an article written for Voxxed, a knowledge-sharing platform launched today by Devoxx in collaboration with Parleys.

The United States is known for its appetite for television and Internet. In such a high-stimulation environment, you’d think lowly radio would not have a voice, but there are a few radio programs that are woven deeply into the U.S. culture. Until two years ago, Car Talk was one of them.

Click and ClackCar Talk had an unlikely premise. Drivers from around the country called in to describe problems with their vehicles to the Magliozzi Brothers, two lively auto mechanics from Cambridge, Mass. The brothers made comical yet perceptive over-the-air diagnoses that demonstrated their encyclopedic knowledge of vehicle makes, models, and years. The critical thinking that earned them both degrees from the Massachusetts Institute of Technology (MIT) was on display as they sorted through the callers’ clues and ultimately approached the root problem. They were usually right, and always insightful.

The New Relic Java Agent team doesn’t employ any auto mechanics, nor do we have our own radio show. But we strive to have a similarly deep understanding of software applications, and the underlying technology that drives them, as the Magliozzi brothers had about cars. After all, we’re in the business of making your apps speak to you.

Your toolset, your vehicle

As an application and service developer, you rely on a vehicle to take you to your destination. Depending on what your team is building, your choice of vehicles may be affected by your need for speed, reliability, agility, or safety.

With development, your vehicle is a set of tools, frameworks, and libraries that help you concentrate on what your business needs. If you’re building RESTful services, you might find that JAX-RS backed by MySQL is simple and scales well. Groovy and Grails, on the other hand, could provide a great balance between performance and productivity. Or perhaps you decide that the functional capabilities of Scala and the Play Framework work well for your data pipeline.

As a good driver, you get to know your vehicle well enough to pilot it. You learn its handling characteristics, its top speed, safety features, and blind spots. Sometimes, you open up the hood (bonnet) to check the fluid levels, but you generally don’t have to worry about how the engine or drivetrain actually works. Your primary focus is to get to your destination.

Under the Hood

The engineers at New Relic are a bit like the Magliozzi brothers. We love to understand what people drive, how they drive, and what issues someone may encounter with their vehicle. In the case of the Java Agent team, we need to understand and support all the main application servers, frameworks, and libraries that developers use on a daily basis. To do that, we need to know how developers approach problems when they are programming in Java, Scala, Groovy, or other languages on the JVM. We also get to drive all the best tools for software development.

Why go through all that trouble? It’s not enough to give generic answers that could apply to any framework. Providing a good diagnosis means providing context and clarity that goes beyond metrics themselves. For instance, when we consider instrumenting a new library, we concentrate on what bottlenecks and errors the users of that library will care about and how we can best present that information in a way that is reliable, enlightening, and actionable.

We develop our knowledge of a framework through a variety of means, but it starts with our customers. We listen to what problems they need to solve. Through conferences, meetups, documentation, and flight-time, we work hard to understand how a framework is used and the problems developers are trying to solve.

Giving Your Apps a Voice

The Magliozzi brothers long ago decided that a call-in radio show was a great way to share their humor and knowledge of cars beyond the garage. After all, many of their most dedicated listeners tuned in while driving their own cars around on Saturday errands. Not only did they help callers (and listeners) make sense of their car troubles, but they often provided helpful advice on steps to take to fix them.

Likewise, New Relic’s job is to sort through the data and provide our customers with a UI that provides the information in a digestible way. To do that, our design team works with our developers, product management, and customers to determine the best way to synthesize the large amount of data into actionable information.

How do we collect this data in the Java Agent? It starts by understanding the flow of execution through an app server, framework, or library. Once we know the common entry points, we can add lightweight instrumentation to extract the raw data and turn it into useful information. With a convention-based approach to aspect weaving, we can efficiently pull the needed information from the runtime context of the application, aggregating the information and sending it to our servers for archiving and display.

As in the world, it’s crucial that the information we provide is correct and applicable to the latest model. We employ a variety of tests to make sure our instrumentation is accurate, including unit, functional, and integration tests across a set of application servers and JVMs. We also have regression tests that verify that our instrumentation works against an open source framework the same day a new version is published!

Enjoy the Drive

On a weekly basis, the Magliozzi Brothers were delighted to diagnose problems and help people fix their vehicles. New Relic diagnoses problems in tens of thousands of applications running around the world. At every conference and meetup, New Relic engineers are delighted to hear how customers’ applications are running more smoothly because of the care that we have taken.

The Magliozzi brothers presented Car Talk from 1977 to 2012. Tom Magliozzi died on November 3, 2014.

Chris Hansen is a Senior Product Manager at New Relic. He works to make New Relic the indispensable tool for monitoring high-performance distributed systems. Chris has worked as an engineering leader, architect, and developer. He lives in Portland, Ore., where he can be found biking, skiing, and building things with his family. View posts by .

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