Chapter 12. Monitoring, Logging, and Incident Handling
Now that you have built your backend, it’s time to take a deeper look into your monitoring and logging tools. This is where you’ll get the info you need to figure out what’s happening in your app across different environments and decide how to handle it.
You’ve set up logging throughout your code, so you already understand what to log and have plenty to test and check for. The goal now is to get meaningful insights from what you’re already logging, such as figuring out when incidents are occurring and resolving them.
In this chapter, I’ll go over:
-
Multiple uses for logs and monitoring data
-
How different tools work
-
Incident plans for production based on logs and monitoring
Monitoring and logging aren’t there just for when something goes wrong. They tell you the story about what is going on across your full stack app and even on the infrastructure level. If you know exactly what happens with the app and when it happens, then you can find out why it happens. This gives you a chance to exercise some creativity and take part in the direction the product goes.
Uses for Logs and Monitoring
Let’s start by defining what logging and monitoring are. If you remember in Chapter 9, we talked about logging for debugging purposes. Logs are messages that are sent as events happen in your app. These are typically created when an action is triggered so that you have a record of the events that happen. Your logs can initially be sent ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access