Instrumenting our application for monitoring
In this section, we are going to make a couple of changes to our application to provide insight into what our code is doing and how it's behaving.
Because monitoring isn't as trivial as it may sound, there is no shortage of monitoring solutions. Since this book is focused on AWS, we will want to utilize what AWS provides as much as possible, starting with CloudWatch.
Furthermore, because of the rudimentary nature of the application, most of what we will implement won't be very meaningful, aside from demonstrating your different options, as well as the ideas behind the process.
AWS CloudWatch
CloudWatch centralizes most essential functionalities for a monitoring solution. We used some of its functionalities previously when we created our Auto Scaling Groups and needed an alarm to trigger Auto Scaling Events, but CloudWatch can do a lot more.
In the world of infrastructure, data mostly comes in two typesâmetrics and logs. CloudWatch supports both data...