Demo project for exploring spring boot 3 observability stack
- Monitoring
- Observability
- Observability vs Monitoring
- Similarities between Observability & Monitoring
- References
- Monitoring is the process of collecting, analyzing, and using information to track a program’s progress toward reaching its objectives and to guide management decisions.
- Monitoring focuses on watching specific metrics.
- Logging provides additional data but is typically viewed in isolation of a broader system context.
- Latency
- Time taken for the request to travel from the client to the server and back
- Traffic
- Number of requests a system receives over a specific period
- Errors
- Percentage of requests resulting in errors, such as
404 Page Not Found
or500 Internal Server Error
- Percentage of requests resulting in errors, such as
- Saturation
- Measures resource utilization, including CPU, memory & disk space
- Monitoring should be applied as early as possible.
- Know exactly what things should be monitored and be aware that this list might change over time based on the project situation.
- Pay attention to the above golden signals for metrics.
- Send alerts that are easy to understand and are right to the point.
- Don't send too many alerts because people may start ignoring them.
- Observability is the ability to understand a system’s internal state by analyzing the data it generates, such as logs, metrics, and traces.
- Observability helps teams analyze what’s happening in context across multi-cloud environments, so you can detect and resolve the underlying causes of issues.
- According to engineers at
google
, 2 pillars of observability:- Logs
- Logs provide a chronological record of events, or transactions within a system
- Logs provide insights into when something happened and what exactly happened
- Metrics
- Metrics are quantitative measurements that offer a snapshot of a system performance over time
- These include numerical values such as response times, error rates & resource utilization
- Traces
- Helps track the flow of requests through various services and components of a system
- Logs
- The higher the level of observability the system has, The quicker we can find the root cause when ever we get notified about an issue.
- Decide what exactly to log as the count and size of the logs can quickly increase over time so that you can have some control over the cost of the storage.
- Cleanup logs whenever not needed.
- In general,
Observability
is a broader concept that includesMonitoring
. Monitoring
alerts us when something goes wrong, whileObservability
helps us to understand why there is an error and how to fix it.Monitoring
has limited information about the issue, whileObservability
has complete information about the issue via logs.
- Observability and monitoring are closely related concepts in software engineering.
- Both aim to provide insights into the health, performance, and behavior of a system.
- They utilize data collection, analysis, and visualization techniques to enable proactive detection and troubleshooting of issues.
- Ultimately, they empower engineers to ensure system reliability, performance optimization, and efficient resource utilization.