Monitoring & observability
Comprehensive visibility into system behavior. Collect metrics, logs, and traces. Proactive alerting on anomalies. Implement feedback loops from production to development. Enable data-driven decisions.
Production health at a glance
appi-crx-prod · orders-api
Illustrative exampleRequests per minute
1,049
Failed requests
0.2%
Response time (p95)
195 ms
Requests per minute
Failed requests
Alerts
All checks healthy
Metrics, logs and traces
Each signal answers a different question. Together they take you from "something is wrong" to "this is why" quickly.
Is something wrong?
Metrics
Numbers over time, such as request rate, failure rate, CPU or queue length. Cheap to store and ideal for dashboards and alerts.
What happened?
Logs
Detailed records of events and errors, queried with KQL in Log Analytics. Structured logging with correlation IDs keeps them searchable.
Where did it happen?
Traces
Follow a single request across services, for example from a web front end through an API and a queue to an Azure Function, and see where time was spent or an error occurred.
The Azure toolset
For most clients I work with, everything needed is already part of their Azure subscription; the work is in configuring it well.
- Azure Monitor. The platform that collects metrics and logs from Azure resources and runs alert rules and action groups.
- Application Insights. Application performance monitoring: requests, dependencies, exceptions, availability tests and distributed tracing, with OpenTelemetry-based instrumentation.
- Log Analytics. The workspace where logs land and are queried with Kusto Query Language (KQL) for investigations, workbooks and alerts.
- Power Platform telemetry. Dataverse, model-driven apps and Power Automate can export telemetry to Application Insights (Managed Environments required; the Power Automate export is in preview), so business applications are monitored alongside custom code.
Alerts that matter: SLOs and error budgets
Alerting on every spike wears a team out until nobody reacts any more. I agree on service level objectives with the business and alert on what threatens them.
How I set them up
- Choose an indicator that reflects the user experience, such as the share of successful requests or of orders processed within a minute.
- Set a realistic objective, for example 99.5% of requests succeed over 30 days; the remaining 0.5% is the error budget.
- Alert on symptoms users notice, and route every alert to an owner with a short runbook.
- When the error budget is running out, prioritize reliability work over new features.
- Review alerts regularly and remove the ones nobody acts on.