Once upon a time, automated testing was not a popular idea. It was too expensive. It was too time-consuming. At best, it was a nice-to-have.
The prevailing idea was that if you were a good and careful software developer, regressions weren’t a problem. When a regression did happen (rarely, of course), the good and careful software developer that you are would carefully consider why it had happened and make a correction to prevent it from happening again. This now seems crazy to most developers.
Unit testing is now accepted as a best practice. Done correctly, it saves time, money, and development effort. It helps developers make good software faster.
Application monitoring is moving along a similar path and for similar reasons. Unfortunately, application monitoring is still in that nice-to-have phase.
If you haven’t thought of application monitoring as being very similar to automated testing – and just as important as automated testing – I’m asking you to do it now. Here are just a few of their similarities:
1) It’s a process, not a product.
Application monitoring is production-level, real-time testing. Tools like Instrumental exist to make it easy, but there’s some work only you can do.
Imagine installing some testing software, providing it with minimal configuration, and then just running that before putting code into production. Could that be helpful? Maybe. Is it as good as writing your own tests? No. Obviously not.
Application monitoring is not something you can install once and have the problem stay solved. Every piece of software is different. It has unique code and unique hotspots. Similar to testing, every time the code is changed it’s worth taking a minute to consider what should be monitored in production. If you’re not, your monitoring tool is delivering about as much value as an install-and-run test suite.
2) Quality is better than quantity.
Imagine a 10-line application with 30,000 unit tests. You’re either about to experience the most sophisticated 10 lines of software ever written or someone decided that every time you changed a character you needed to see 1000 failing tests.
Like testing, application monitoring isn’t about having as much of it as you can. There’s no award for having the most measurement. In fact, it’s counter-productive to have too much. Having more things flash red doesn’t help you solve a problem faster. It’s about getting the right information to help solve the problem.
When it comes to your production environment, there’s no substitute for seeing exactly what you need to know. What code is having a problem? What, exactly, is the problem? Thoughtful, customized measurement is critical.
3) It tells you what’s wrong before anyone else.
In this case “anyone else” is “the customer”. Application monitoring is about spotting problems before they happen. It’s about being proactive. In the worst case, it’s about figuring out what’s wrong as fast as possible. Like a good unit test, good application monitoring points to exactly what’s wrong so you can start fixing it immediately.
If you’ve worked on a project where the tests are brittle, wrong, or misleading, you know exactly how valuable it is to have tests that break at exactly the right time and provide a clear message of what is wrong. Good application monitoring provides that same value in production.
4) It saves you time, money, and sanity.
Good testing is about increased development speed through increased confidence. The more sure you are you’ve done the right thing, the faster you can go. Application monitoring does the same thing in production. It’s about knowing that every part of your software is doing the right thing every moment of every day. Guessing about the production status of any part of your application, hand checking it occasionally, or using some high-level off-the-shelf solution is a recipe for missing out on the critical details that are specific to your application.
5) It’s about admitting that you don’t always know what’s going to happen.
Application monitoring is not a replacement for testing. Automated testing is incredibly valuable. Even the smartest and most careful developer can’t always predict every little nuance of the code they’re working on. Tests help prevent those mistakes from seeing the light of day.
Application monitoring works the same way. A lot can happen in production that even an excellent developer can’t predict or can’t (easily) replicate. Customers do things you never considered. There’s a weird interaction with a new version of a browser. There’s a difference between the development environment and production that no one ever noticed before. A famous person tweeted about your app and your customer base tripled over night.
Adding carefully thought-out custom monitoring can help safeguard against the things you can’t predict.
The case is clear; application monitoring is not a nice-to-have. It’s time for software developers to start making application monitoring part of their standard practice.