Logging helps in monitoring

Another challenge if you move from a monolithic application to microservices is the lack of stack traces through services. For one single request, one action is happening in service A, another action is happening in service B, and so on. The final result of that request is a failed response, but what happened inside, which service actually failed, and why are there questions to answer and lots of effort in debugging required? What happens if one of your microservices in your infrastructure starts throwing stack traces? One idea to trace any request is to bind every request with a unique global request ID, which will propagate to every service and log it.

It is good that we can bind different service actions taken for one request with one request ID, but still, the logs may be on different machines. It is still not easy for developers to track down the bug. For that, you might need a tool that will help in centralizing logging windows for developers. There are some tools for that , such as Loggly or ELK, which we will discuss in the tools section.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset