Metrics and Queries for Operations
This lesson explains the signals, service levels and error budgets that describe a running system.
Learning outcomes
After completing this lesson, you will be able to:
- Describe the golden signals.
- Distinguish SLIs, SLOs and SLAs.
- Calculate an error budget.
- Explain how to correlate deployments with telemetry.
Core signals
Operations measures describe a service from the outside. Four signals are widely used, often called the golden signals: latency, or how long requests take; traffic, or how much demand exists; errors, or how many requests fail; and saturation, or how close a resource is to its limit. Together they answer whether users are being served and whether trouble is approaching.
Availability is usually calculated as successful requests divided by total requests, or as the proportion of time that a service met its target. Latency should be reported in percentiles, because an average can look healthy while the slowest 5% of users have a bad experience. The lesson on analysing telemetry shows how to calculate these figures with KQL.
The golden signals
Time-based incident measures
Beyond the signals themselves, teams measure how they respond. The following measures divide an incident into phases.
- Mean time to detect (MTTD) runs from the start of a problem to the first alert. It reflects the quality of monitoring.
- Mean time to acknowledge runs from the alert to a person engaging. It reflects on-call arrangements.
- Mean time to recovery (MTTR) runs from the start of the problem to the restoration of service. It reflects tooling and the ease of rollback.
- Mean time between failures runs from one failure to the next. It reflects stability.
A team with a long MTTD should improve its alerts first, as no amount of fast repair helps if nobody knows about the problem.
The phases of an incident
Service levels and error budgets
A service level indicator (SLI) is a measurement, such as the percentage of requests served in under 300 milliseconds. A service level objective (SLO) is a target for that indicator, such as 99.9% over 30 days. A service level agreement (SLA) is a contractual promise, usually with financial consequences.
An error budget is the failure that an SLO allows. An objective of 99.9% over 30 days allows 0.1% of about 43,200 minutes, which is about 43 minutes of downtime. A team with budget remaining can deploy freely and take measured risks. A team that has spent its budget should slow releases and work on reliability. Error budgets thereby turn a disagreement about speed and stability into a calculation, and a pipeline can use the budget as a release gate.
The following diagram shows how much of a month's error budget remains for a service with a 99.95% availability SLO after two incidents.

Error budgets
Correlating deployments with telemetry
The most common operational question is whether a release caused a change in behaviour. Azure Monitor provides workbooks for interactive reports, dashboards and alerts on these signals. Release annotations in Application Insights place markers for deployments on charts, so that a jump in failures can be aligned with a release. A pipeline can create an annotation with a task or an Azure CLI step, which automates this link.
GitHub and Azure DevOps both retain the time and content of each deployment. With both sources, a team can compare the behaviour before and after a release, and identify the commits it contained.
Did the release cause it?
A spent error budget
A service has a 99.95% monthly availability SLO, allowing about 21 minutes of downtime in a 30-day month. Two incidents have already caused 19 minutes of downtime, with 12 days remaining. A large release is planned for tomorrow. What should the team do?
Only about two minutes of budget remain, so the error budget policy indicates that risky changes should wait. The team should postpone the large release, or reduce its risk by releasing it behind a feature flag or to a small canary group, and should use the time to address the causes of the two incidents. Proceeding unchanged risks breaching the objective, and raising the budget would remove the purpose of having one.
What is the difference between an SLO and an SLA?
Show answer
An SLO is an internal target for a service level indicator. An SLA is a contractual promise, usually with financial consequences.
Exam Tips
Remember for the exam
- Golden signals: latency, traffic, errors and saturation.
- SLI is a measurement, SLO is a target, SLA is a contract.
- A 99.9% objective over 30 days allows about 43 minutes of downtime.
- Long detection time points to better alerts, not faster repairs.
- Release annotations correlate deployments with telemetry.