Every single application is created to solve specific business requirements and accomplish certain business goals, so it is essential to assess on a regular basis an application to verify whether these goals are being accomplished. As part of this verification process, we want to measure the health and performance of our application using metrics that can give us insights into the following factors:
- Application Monitoring: When we are talking about the health of an application, it is important to know the amount of resources that are being used, such as CPU, memory consumption, threads, or I/O processes. Recognizing potential errors and bottlenecks is important to know whether or not we need to scale, tune, or refactor our code.
- Business Monitoring: These metrics are helpful to understand key business indicators about the business itself. For example, if we have an online store, we want to know whether or not we are accomplishing the established sales goals, or in a banking application, we would like to know how many transactions and customers we receive in a certain branch office, channel, and so on.
We are going to use the banking application created in Chapter 5, Model-View-Controller Architectures, as an example to list a number of monitoring concepts that can apply to it. Let's start showing how we can monitor the aforementioned application using the tooling that Spring Framework brings out-of-the-box.