17 April 2018 News

Getting Started with APM for the Elastic Stack - A Recap

By Lauren Johnson

This post is part of the Elastic{ON} 2018 blog series where we recap specific demos and related deep-dive sessions from the conference. From machine learning forecasting to APM to security analytics with Mr. Robot — check out the full list below.

Visualizing the performance impact of code changes lets you quickly resolve issues and get back to doing what you do best — writing great code. With Elastic application performance monitoring (APM) features, you can see detailed data on your application’s performance, requests, users, errors, and more. Watch this ten-minute demo from Elastic APM Tech Lead Ron Cohen to see how easy it is to get started.

The APM team put a lot of effort into making the getting started process as simple as possible. First, download, install, and run the APM server. Next, you’ll need to install the APM agent directly into your application. (Watch the demo above to see exactly how to install an agent in Node.js applications.) Finally, re-deploy your application, and APM data should start streaming into the APM UI in Kibana. It’s that simple.

Once your data is streaming into Elasticsearch, you can use the APM UI to quickly identify performance issues in your application. In the Request tab, see your response time percentiles and how many requests per minute your application is serving. You get all this information broken down by HTTP status codes, along with a table of all endpoints in your application showing average response time and requests per minute for each endpoint.

If you have a particular endpoint that is slowing down response times, simply click on it for more detailed information. Select a slow response time bucket to see a timeline that shows you what your application was doing — like processing a huge number of SQL queries, responding to cache calls, or rendering templates — when it slowed down. Choose a specific query or cache call for even more information, including a stack trace that shows you the exact location of the problem in your code.

Because the APM module gathers such rich performance data from your application, it can also give you detailed information about errors happening in your application so you can identify and resolve problems. The Error tab in the APM UI gives you a stack trace on each error as well as information on frequency, users, process, service, and tags.

This is just the beginning of optimizing performance and debugging code quickly with an APM solution built on Elasticsearch. Watch the full APM with the Elastic Stack talk to learn about real user monitoring (currently in beta) and other exciting developments in the works.

And If Node.js applications are your jam, check out Instrumenting Node.js Apps with Elastic APM for an advanced tutorial on minimizing instrumentation overhead, adding metadata to your collected metrics, and more.

Plus, see what happens when you pair APM data with the anomaly-detecting powers of machine learning starting at the sixteen-minute mark in the Machine Learning in the Elastic Stack talk.

See what else we covered during the conference in these recaps: