AWS RUM: Web App Performance Monitoring

Michael Levan - Dec 1 '21 - - Dev Community

As monitoring increases in necessity, so does the need for monitoring specific types of applications and more importantly, different pieces of the application. As software becomes more complex, engineers need to have a way to properly monitor performance and MTTR (Mean Time To Resolve). Otherwise, users will go just as fast as they came to use an application.

At AWS re:Invent 2021, AWS RUM was announced to solve that exact problem.

In this blog post, you'll learn about what RUM is and how you can get started.

What is AWS RUM

Monitoring application performance, health, and efficiency are crucial. Anything from how an application is working to the code quality to how it's deployed should be in a constant state of monitoring. Otherwise, issues will continue to pop up that you'll either have to resolve in a "putting out the fire" method or you'll be too deep into tech debt to actually fix an issue once you realize it exists.

Standard APM solves one problem, but what about if you want the ability to monitor in real-time? As if it were a literal user using the application? Not only that, but across multiple devices, geolocations, and web browsers? The ability to do this exists, but not without heavy engineering and creating a way to do it from scratch.

Welcome to RUM. AWS RUM is a real-user monitoring solution that's part of the CloudWatch monitoring family to help identify bugs, fix performance issues, view anomalies, and fix app concerns in near real-time.

Why Should You Care

There are between 1.6 and 1.9 billion web applications in the world.

Think about it for a second; what business in today's world doesn't have a website? What business doesn't have some type of application? Unless it's a small mom and pop shop (and even then, there are many websites) there aren't many businesses that don't have some type of web app.

When thinking about the complexity of an application; different browsers (google, edge, safari, etc.), mobile browsers, user locations, different styles of connectivity, how can you properly test it all? Sure, there are testing methods available, but it's all artificial.

Simply put, testing application performance for web apps needs to be more real-world at this point.

Getting Started

In this section, you'll learn how to get started with AWS RUM.

First, log into the AWS portal and go to the AWS RUM service under CloudWatch and click the orange Add app monitor button.

Image description

Next, specify details like the app monitor name (whatever name you want) and the website.

Image description

Under the data collection section, you can choose what you want to monitor:

  • Performance telemetry
  • JavaScript errors
  • HTTP errors

You'll also have the opportunity to have RUM set cookies if you wish.

Image description

Next, specify the sessions that you want to be analyzed. Ideally, you want all sessions analyzed to collect as much data as possible.

Image description

Because AWS RUM is a service, it'll need proper permission. You can create a new identity pool, use an existing pool, or set up private auth from outside of AWS. Once complete, click the orange Add app monitor button.

Image description

The final screen will show a JavaScript snippet. You'll need to copy the snippet and put it into your HTML <head> section.

Image description

Once you copy the JavaScript snippet and put it into the <head> section of your HTML code, you'll be able to start monitoring the app!

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .