Monitoring and logging are very important for any enterprise application, especially when we are dealing with a microservices-based distributed application with the involvement of several technologies. But logging and monitoring for individual microservices-based applications are very challenging due to the distributed behavior of the application's deployment. In a distributed application, several microservices are running together on several machines, so logs generated by different microservices are very difficult to trace end-to-end transactions.
In this chapter, we will elaborate on some of the best practices in building distributed systems and on performance monitoring for production-ready services. We will introduce log aggregation using the Elasticsearch/Logstash/Kibana stack for distributed applications.
By the...