DEV Community

Michael Levan
Michael Levan

Posted on

Application Reliability with APM

There are a few ways that users know an application is working properly:

  • They try to reach it via a web browser
  • They try to reach it via an app
  • They know it’s not working properly if it’s slow or bogged down

From a user perspective, it’s straightforward to know if the app is working or not, but what about the developer building it or the engineer keeping it running? Unless they’re constantly checking it manually, they wouldn’t have a solution.

Until Application Performance Monitoring (APM) is implemented.

In this blog post, you’ll learn about why APM is important, what you’ll need to do to implement it, and how to get started with Azure Container Application Insights.

What is APM?

Have you ever gotten that lovely 2:00 AM call or that sprint into your cubicle from the manager saying something along the lines of the application is completely down or t*he application is incredibly slow and we’re getting complaints from users*?

All types of engineers, whether it’s infrastructure pros or software developers all have heard this in one way or another. In short, the application is not working or responding to requests as originally expected. Because of that, you need a way to ensure that you know about those issues before they become an issue.

A few things you want to know are:

  • Is the application performing the way you expected
  • Are there any API call errors
  • Is an app down
  • Is there a way to automatically resolve these issues (AIOps?)

With APM, you’ll get a deep and documented understanding of what’s happening inside of the code. Your goal is to ensure that the application stays up, is working as expected, and is performing as expected. The way that you ensure that happens is with APM.

How to Implement APM

There are a few different ways to implement APM, but the typical is to either add the APM product code into your code via some SDK or create some instrumentation protocol.

Below are a few ways to do it with some popular products:

  • With Datadog, you would integrate the SDK/framework into your code to push data from your app to Datadog.
  • With NewRelic, same thing as Datadog. Integrate the SDK into your code. For example, here’s what it would look like for Go (Golang)
  • With DynaTrace, you guessed it.. same as Datadog and NewRelic.

One differentiator that’s been seen so far is with Azure Application Insights. With AppInsights, you can set up automatic instrumentation with Java apps. Although it only currently works with Java apps, it’s still a pretty cool way to set up APM.

APM in Azure with Application Insights

If you’re a native Azure user and you’re looking for APM, your best bet is to take a look at Application Insights, specifically for containers.

Application Insights allows you to instrument your code via SDK’s to pull in all types of information about the app, including:

  • Any faulty connections, for example, the apps backend to the database
  • Any API errors
  • Laggy apps
  • The ability to monitor apps live
  • Any performance issues

Below is a screenshot showcasing the Kubernetes Deployment, the container running inside of the Deployment, and it’s current stats.

Image description

If you want richer insights into your application, you’ll need to use one of the Application Insight SDK’s for the language your app is written in.

Currently, the only support languages/frameworks are:

  • .NET Core
  • .NET
  • Node
  • JavaScript
  • Python
  • Java

At the time of writing this, the only programming language you can use without having to instrument the code with an SDK is Java.

Top comments (0)