Metrics are a great way to find useful information about our application and infrastructure. Before we start using metrics and preparing reports for the business, we need to integrate our app with some tools. That’s why today our focus is on how to measure, which means that we’re going to delve deep into how our application code works in the first place.

In the previous article, we described how it is possible to uncover various problems with an app by finding bottlenecks in the project, why metrics are great to do this, and why we went for the Prometheus tool to accomplish our objectives. Today, we’re going to actually start measuring the app.

Try Prometheus metrics yourself!

Most of us prefer to check things by themselves rather than implementing them without knowing if this whole thing works as expected. Luckily, there is a live demothat contains the default Prometheus dashboard and is integrated with Grafana.

All you need to know about integration with Prometheus

One of the best things about Prometheus is the support for many languages. In most cases, we don’t need to worry about how to write integration and handle all the best practices. Here you can find a list of client libraries to work with Prometheus.

Currently, there are around 20 libraries for different technologies! If your technology is not on the list, you can follow a special guide which explains how to write your own integration.

The application which we needed to optimize and integrate metrics for was written in PHP/Symfony. We’re going to present examples in these technologies. Still, it would be easy enough to transfer it to something else.

Let’s get back to the application.

We wanted to save time and deliver a solution as soon as possible. We used the existing bundle instead of writing a new one. Our choice was the tweedgolf bundle. It’s a nice and small library which has got everything that we needed.

#developer stories #devops #grafana #metrics #php #prometheus #symfony

Use Prometheus metrics with Grafana and measure your app's performance
13.10 GEEK