Logging
Definition
Recording events and activities in your application for debugging and monitoring, essential for maintaining system health and performance.
Use Cases
- Netflix: Troubleshooting and monitoring microservices in a large-scale streaming platform — Netflix emits structured application and service logs from microservices and aggregates them into centralized log analysis systems to support search, correlation, and incident response workflows. (Faster detection and diagnosis of production issues, improved operational visibility across distributed services, and reduced time to restore service during incidents.)
- Shopify: Investigating checkout errors and performance issues during high-traffic events — Shopify collects application and infrastructure logs, correlates them with request identifiers, and uses centralized querying/alerting to pinpoint failing components and error patterns. (Quicker root-cause analysis during traffic spikes, improved reliability of critical purchase flows, and better insight into error rates and system behavior.)
- GitHub: Security auditing and operational monitoring for platform activity — GitHub records audit and application logs (such as authentication events and service errors) and analyzes them to detect anomalies, investigate incidents, and support compliance needs. (Improved security visibility, stronger incident investigation capabilities, and better tracking of operational health and user-impacting errors.)
Provider Equivalents
- AWS: Amazon CloudWatch Logs
- Azure: Azure Monitor Logs (Log Analytics workspace)
- GCP: Cloud Logging
- OCI: OCI Logging
Frequently Asked Questions
- What's the difference between logging and monitoring?
- Logging records detailed event data (for example, an error stack trace or a user login event). Monitoring focuses on measuring and alerting on system health signals (like CPU usage, latency, or error rate). In practice, monitoring often uses metrics and alerts, while logs provide the detailed evidence you search during troubleshooting.
- When should I use logging?
- Use logging whenever you need to troubleshoot issues, understand application behavior, audit important actions, or support incident response. It’s especially important for production systems, distributed/microservice architectures, and any application where you need to trace requests, investigate errors, or meet compliance and security requirements.
- How much does logging cost?
- Logging costs usually depend on (1) how much log data you ingest, (2) how long you retain it, (3) how often you query/analyze it, and (4) any data export or archival storage. Costs can grow quickly with high-volume debug logs, verbose request logs, or long retention periods, so common cost controls include sampling, log level tuning, retention policies, and routing older logs to cheaper storage.
Category: monitoring
Difficulty: basic
Related Terms
See Also