Microservices being totally distributed as a single request can trigger multiple requests to other microservices, and it becomes problematic to track what was the root cause of a failure or a breakdown or the overall flow of request across all services.
In this section, we will learn about how to track different Node.js microservices by doing logging the right way. Recall the concepts of logging and types of log, which we saw in Chapter 4, Beginning Your Microservice Journey. We are going to move ahead in that direction and create a centralized log store. Let's start by understanding our logging requirements in a distributed environment and some of the best practices that we are going to follow to handle distributed logging.