Why it matters
The worst way to learn your service is down is from an angry customer on social media. Good teams know first, and know why. Monitoring and logging appear across Ghanaian cloud and DevOps adverts, with tools such as Prometheus, Grafana, the ELK stack, Amazon CloudWatch and Azure Monitor. If you deployed an API in the backend track's deploy and monitor lesson, this goes deeper.
Three kinds of signal
- Metrics are numbers over time: requests per minute, error rate, response time, CPU and disk use. Cheap to store and great for dashboards and alerts.
- Logs are text records of events: "payment 4821 failed: timeout". Great for finding out why something happened.
- Traces follow one request through several services, showing where the time went.
What to watch: four signals
For any service that users reach, start with four signals:
- Latency: how long requests take.
- Traffic: how many requests arrive.
- Errors: how many fail.
- Saturation: how full the resources are, such as CPU, memory or disk.