Inspecting application behavior
At the beginning of this chapter, we learned how to collect metrics throughout our application. That's the first step to successfully maintaining an application that is running smoothly in production. By collecting metrics and periodically analyzing them, we're aware of how well our application is performing. During this analysis, we will surely spot outliers or some odd behavior from a certain function or module, which will drive us to analyze its cause.
Besides learning how to collect metrics, we've also seen how to run a remote shell that's connected to our application in production. We'll also use a remote shell to run our experiments. Note that running them in production is dangerous. Since we're using our live environment, we risk bringing the service down for our clients, either due to a careless experiment or just from the added load to the system.
While this is true, and we do recommend the greatest of care when carrying out this sort of task, we also...