Distributed logging in Micronaut microservices
As we discussed in the chapter introduction, in a microservices-based application, a user request is executed on multiple microservices running on different host environments. Therefore, the log messages are spread across multiple host machines. This brings a unique challenge to a developer or admin maintaining the application. If there's a failure, then it will be hard to zero down on the issue as you have to sign into multiple host machines/environments, grep the logs, and put them together to make sense.
In this section, we will dive into log aggregation for distributed logging in microservices.
Log aggregation, as the name suggests, is combining the logs produced by various microservices and components in the application. Log aggregation typically involves the following components:
- Log producer: This is any microservice or a distributed component that's producing logs while executing the control flow. ...