13 Observability through logging
Before you begin: Join our book community on Discord
Give your feedback straight to the author himself and chat to other early readers on our Discord server (find the "rust-web-programming-3e" channel under EARLY ACCESS SUBSCRIPTION).
We now have a working to-do application that can either run as a single binary or run as multiple servers. However, we do not actually know what is going on inside our system. Let us say that our system makes a request from on server to another. How do we know that this request was made and what the response was. We don’t. We can try and work out what happened from the error message returned to the frontend, but this might not be clear. We also might not want to expose intricate details of the error to the frontend. To remedy this, we can produce logs of these requests and how the request travels through the system. This also gives us the power to inspect the steps that...