Adding the second cloud-native feature – monitoring
So, we have made our application more robust than it was by adding some resilience features. Next, we will go a step further and add monitoring functionality to our application.
The idea behind monitoring is two-fold.
First, it should supply you with information that your system is running as expected. Any errors, exceptions, network failures, database hiccups, and more should be identified, registered, and reported.
Secondly, monitoring should provide you with information about the usage of the system. How many new users do we have, how many orders are there in the system, how often does a certain REST endpoint access, and how often is a critical business method invoked?
The monitoring process consists of several steps:
- Add annotations to your code that will actively monitor the metrics.
- Expose the metrics data for harvesting.
- Harvest the data.
- Generate alerts and create visualized data. ...