Application Performance Monitoring (APM) with Elasticsearch 6.1.1

In June 2017 Elastic joined forces with Opbeat an application performance monitoring (APM) company. Read the official blog post here: Welcome Opbeat to the Elastic Family.

Adding APM (Application Performance Monitoring) to the Elastic Stack is a natural next step in providing our users with end-to-end monitoring, from logging, to server-level metrics, to application-level metrics, all the way to the end-user experience in the browser or client.

Elastic APM consists of three components:

  • Agents: libraries that run inside of your application process and automatically measure the duration of requests to your service and things like database queries, cache calls, external http requests and errors
  • The APM server (written in Golang) that processes data from agents and stores the data in Elasticsearch
  • Kibana UI: dashboards that gives you an instant overview of application response times, requests per minutes, error occurrences and more.

The APM server and the agents (right now available only for Python and NodeJS) are open source:

Read more about it here: Starting Down the Path of APM for the Elastic Stack

In this post we are not going to see how to install the APM server, you can find the instructions here: Open Source Application Performance Monitoring.

Once the APM Server is installed and started we can monitor the performance of our application. In this example we will see a Python Flask application.

Install the Python APM library:

Initialize the client:

Within the Flask route you can log some messages:

or exceptions:

Here is how the monitoring looks like in Kibana:

You can see the details of each request by clicking on it:

 

I really like the APM feature fully integrated with the Elastic Stack. I will integrate it within my Flask/Django applications.
If you want to read more about the new APM feature:

If you want to read more about this topic: Application Performance Monitoring with Elasticsearch 6.1, Kibana and Skedler Alerts.

Leave a Reply

Your email address will not be published. Required fields are marked *