Logging and Monitoring
With a microservices solution, many services can interact with each other. When one service fails, the complete solution should not break. In the previous chapter, we covered different kinds of tests to find issues early. Here, we’ll look at finding issues in production as early as possible – probably before a user sees a problem.
To find issues when the application is running and see how the application runs successfully, the solution needs to be enhanced to offer telemetry data. With logging, we see what’s going on; based on different log levels, we can differentiate between informational logs and errors. With metrics data, we can monitor counters, such as memory and CPU consumption, and the number of HTTP requests. We will also write custom counters to see the number of games played and the number of game moves needed for a win. Distributed tracing gives information on how services interact. Who is making calls to this service? Where...