API Logging Deep Dive
Understand different types of configuration for API logging.
Why log?
When we work in the cloud, we have to expect the unexpected. Experts rightly warn that we must understand that "everything fails all the time" in the cloud (AWS CTO Werner Vogels). It’s said that "success is an exception" for services deployed on the cloud, and our implementation should survive all eventualities.
Things go wrong, and the applications fail more often than we imagine. When that happens, the first problem is identifying what went wrong. Unfortunately, when our data flows through a hundred services deployed across the globe, it’s challenging to locate the path it followed or guess if it missed something.
AWS provides CloudWatch to watch all that’s happening in the cloud. Besides other features, CloudWatch can collect all logs of all services running in our account and it helps us analyze those logs. We can configure all AWS services to dump their logs into CloudWatch. We can also configure special alarms in CloudWatch so that it notifies us when our attention is required.
CloudWatch is versatile so, naturally, it costs money. Excessive logging is costly. At the same time, ...