How Free APM Tools Can Help You With Testing and Troubleshooting

on October 30, 2020

APM (application performance management) services are essential tools in every developer’s/SRE’s toolbox, together with centralized logging services. APM tools provide visibility into the application’s code and performance, and they allow easy, quick testing and debugging. This post explains how free APM tools can help you with testing and troubleshooting your application.

Prehistory: The Naive Approach

Until relatively recently (10 years ago), the way applications were monitored for performance issues was somewhat intuitive and naive. Most applications were installed on-premises on the client’s machine. In a B2C scenario, they were installed on a PC; with a B2B scenario, as part of the data center. In any case, when a client reported a performance issue, malfunction, or bug, you had designated personnel to address it.

Fixing Stuff the Old Way

A support call center with different levels of support experts (tier one through three, usually) was the point of contact for the client in the B2C case. A dedicated account manager/sales engineer served this purpose in the B2B case. If the support expert/account manager was able to reproduce the issue, and the issue wasn’t solvable via proper configuration on the client’s machine, it was escalated to developers. The developers in turn would issue a hotfix or service pack, or they would add the fix to a new release and make it available for download to the client’s machine.

The Long and Winding Road

This process could have taken a few months from start to finish, from the moment a bug is first reported to the moment it’s finally resolved for the client on their machine. Not the best customer experience, mind you. Nowadays, in some cases, we will still have this process in place, but we can often circumvent it.

Things Change

This all changed in recent years. More and more applications are moving away from on-premises installations to a SaaS model. In addition, applications became more complex with the move to microservices-based architecture. In a similar way, the increased usage of open-source software libraries increased the number of code lines and the complexity of applications. This combined with increased customer expectations for a satisfactory level of service has caused companies to look for APM tools.

How Free APM Tools Can Help You With Testing and Troubleshooting

APM tools, even in their free versions, give you visibility into your SaaS app. Some products, such as SolarWinds® AppOptics, offer a free version for local and development environments. To achieve this visibility, you usually have to install a small client application (agent) to collect application data. There are many ways free APM tools can help you with profiling, fixing, and monitoring your application. These include, but are not limited to, the following.

© 2020 SolarWinds Worldwide, LLC. All rights reserved.

Application Metrics

A good APM tool will give you detailed data regarding response times, request duration, and RAM and CPU usage. This helps you easily identify and solve bottlenecks in your infrastructure.

Visualization of the Application Topology

In the day and age of microservices, it’s hard to have a full mental model of your application. It’s hard to understand what microservice is called by other microservices and vice versa. Having a clear mental model of your application is necessary for:

  • Making architectural decisions (Do we need another microservice here? Can we refactor an existing one? Does this call have to pass all those microservices?)
  • Fixing bugs (What microservices are involved in this faulty request?)
  • Eliminating bottlenecks (What microservices take the most processing time?)

Distributed Trace

In the old days, it was hard to fix bugs by inspecting your code trace. The trace could have been composed of hundreds of functions calls. Moreover, multi-threaded code had a trace for each thread, thus multiplying the complexity of finding the bug’s root cause by the number of threads. Today, when an app can have hundreds of microservices and a request can travel through dozens of them before returning to the end user, manually triggering and parsing traces is almost impossible. APM tools have a distributed trace feature to give you code traces across microservices. This way, you get a layout of the function calls per microservice per trace in an intuitive and readable GUI.

Database Request Optimization

Many APM tools provide you with visibility into your DB too. When a request includes access to the database, the APM will tell you what query was run and how much time it took. When you identify a slow DB request, you can add indexes, remove redundant data, or refactor the request itself to make it run faster.

Rapid Testing

When deploying a new feature, you want to be certain it won’t negatively affect the customer’s experience. Having an APM in your development environment allows you to quickly understand whether the new features meet the defined standards, such as response time, memory usage, CPU load, and so forth. This saves you a lot of back and forth.

When You Don’t Test

If you don’t test the application performance on the development or staging environment, you might get angry interactions from clients. If the QA team doesn’t notice the performance issue, the first ones to encounter and report it will be your clients. The client will call your support team, who will have to investigate, reproduce the issue, and then escalate it to the development team. Afterward, the development team will have to issue a fix, test it on the development environment, and then deploy to production. Lastly, you have to check to ensure the required metrics are met on production as well. Only then can you mark this issue as resolved. This is similar to the “investigate, fix, send a service pack” cycle we described above for the traditional debugging approach. Using an APM during development can save this whole cycle and identify the issue early in development.

Framework Support

Most APM tools have an ecosystem of plugins and integrations to give you specific insights for your framework of choice. For instance, if you use Magento, the APM tool can give you a visualization of the different stages of your request in accordance with the framework’s internal code. For example, it groups the different functions that access the database layer and the functions responsible for viewing the data (and more) into separate blocks with their own statistics: duration, CPU load, memory usage, and so on. This gives you a deeper understanding of how your code is structured and what code parts deserve your attention.

Real-Time Alerts

An APM tool can send real-time alerts if your application metrics exceed a desired threshold. For instance, if your CPU usage is over 80%, you get a notification in a format you can usually modify. Or if the average response time is greater than two seconds. In addition, send notifications to your SRE’s Slack channel, so they can quickly start working on this.

Conclusion

To move fast and minimize the time it takes a feature to reach production, you need to fix bugs quickly. Likewise, to avoid development/SRE teams working on mitigating service quality issues instead of producing more value for the organization in the form of new features, you need to be able to test your application against defined quality standards early in the development process. A free APM tool like SolarWinds AppOptics Dev Edition can give you quick bug resolution and rapid testing against quality metrics. This minimizes overhead, saves time, and allows faster delivery of new features while maintaining service quality.

This post was written by Alexander Fridman. Alexander is a veteran in the software industry with over 11 years of experience. He worked his way up the corporate ladder and has held the positions of Senior Software Developer, Team Leader, Software Architect, and CTO. Alexander is experienced in front-end development and DevOps, but he specializes in back-end development.

Related Posts