Skip to content

Monitoring guide

Azure monitoring for applications

Azure Monitor holds platform metrics for every resource. Pair the few that matter with traces from your code and checks from outside Azure.

4 min read14 sectionsUpdated

On this page

Key points

  • App Service: HTTP 5xx, response time, CPU and memory percentage.
  • AKS: node and pod resources, restarts, pending pods.
  • Azure SQL: DTU or vCore usage, deadlocks, storage.
  • The Collector’s azuremonitor receiver reads platform metrics.

Metrics worth watching

ServiceMetricsWorry when
App ServiceHttp5xx, HttpResponseTime, CpuPercentage, MemoryPercentage5xx rising; plan near capacity
AKSNode CPU and memory, pod restarts, pending podsRestarts; pods pending
Azure SQL Databasedtu_consumption_percent or cpu_percent, deadlock, storage_percentNear 100%; storage low
Storage accountsAvailability, SuccessE2ELatency, throttling errorsThrottling
Service BusActiveMessages, DeadletteredMessagesBacklog growing

Collecting Azure Monitor metrics

otel-collector.yamlyaml
receivers:
  azuremonitor:
    subscription_id: ${env:AZURE_SUBSCRIPTION_ID}
    tenant_id: ${env:AZURE_TENANT_ID}
    client_id: ${env:AZURE_CLIENT_ID}
    client_secret: ${env:AZURE_CLIENT_SECRET}
    resource_groups: [prod-web]
    collection_interval: 300s
exporters:
  otlphttp/vitalrix:
    encoding: json
    metrics_endpoint: ${env:VITALRIX_API}/api/v1/metrics/otlp/v1/metrics
    headers: { x-api-key: ${env:VITALRIX_KEY} }
service:
  pipelines:
    metrics: { receivers: [azuremonitor], exporters: [otlphttp/vitalrix] }

Use a service principal with the Monitoring Reader role on the resource groups you need.

Azure monitoring with VitalRix

VitalRix has no native Azure integration; the Collector route above sends Azure Monitor metrics over OTLP to VitalRix dashboards and alerts. Instrument your apps with OpenTelemetry for APM, monitor AKS like any cluster (Kubernetes monitoring), and check public endpoints with uptime monitoring from outside Azure.

App Service specifics

App Service plans share CPU and memory between all apps on the plan, so one busy app can slow others. Watch the plan's CPU and memory percentage as well as each app's response time. Health check (in the app's settings) removes unhealthy instances from the load balancer; point it at a lightweight endpoint. Slot swaps are a deployment; record them as deploy markers by setting service.version in your telemetry.

Alerts to start with

  • Http5xx above a small share of requests for 5 minutes.
  • HttpResponseTime p95 above target.
  • App Service plan CPU above 80% for 15 minutes.
  • Azure SQL CPU or DTU above 90%; deadlocks increasing.
  • An uptime check on the public URL from outside Azure.

AKS clusters

Treat AKS like any Kubernetes cluster: pod CPU and memory against limits, restarts, pending pods and node pressure, plus traces from your services. See Kubernetes monitoring for the full list.

Azure SQL in brief

Watch CPU or DTU percentage, data IO, log write percentage and storage. Query Store shows the most expensive queries over time; pair it with traces to see which endpoints run them.

What to watch per Azure service

ServiceMetrics that matterStarting alert
App ServiceHttp5xx, Response Time, CPU and memory percentage of the plan5xx above 1%, plan CPU above 80% for 10 minutes
Azure SQL DatabaseCPU or DTU percentage, deadlocks, storage percentage, connection failuresCPU or DTU above 80% sustained
Azure FunctionsExecution count, failures, durationFailure rate above your budget
AKSNode CPU and memory, pod restarts, pending podsPods pending or restarting repeatedly
Storage accountsAvailability, success E2E latency, throttlingAvailability below 99.9%, any throttling
Application Gateway / Front DoorUnhealthy hosts, backend response statusAny backend unhealthy

A setup that covers the gaps

  1. Turn on diagnostic settings for the services that matter, so their logs and metrics go to one Log Analytics workspace instead of staying in each resource.
  2. Instrument your code with OpenTelemetry. Azure's own tooling supports it, and the same instrumentation can send to another backend, which keeps you free to choose.
  3. Check from outside Azure. Azure Monitor sees Azure from inside; an uptime check from several regions sees what users see, including DNS, certificates and the edge.
  4. Alert on symptoms first: error rate and latency of the user-facing endpoints, then resource metrics as supporting signals.
  5. Watch the Azure Service Health feed for platform incidents in your regions, so you do not debug an outage that is Microsoft's.

Frequently asked questions

Can I use Application Insights and OpenTelemetry together?

Yes, but sending the same telemetry to two backends doubles cost. Many teams standardize on OpenTelemetry and choose one destination.

How often are Azure platform metrics available?

Most platform metrics have one-minute granularity with a short delay. A 5-minute collection interval keeps API usage low.

Check it now, free

  • What is a service map?: A service map shows which services call which, built from real traces. Learn how it is drawn, how to read it during incidents and why edges go missing.
  • How to monitor Fly.io: How to monitor apps on Fly.io: multi-region uptime checks, machine health, the built-in Prometheus metrics, Postgres clusters, OpenTelemetry traces and alerts.
  • How to monitor Heroku: How to monitor apps on Heroku: H12 timeouts and other router errors, dyno memory (R14), response time, Postgres and Redis add-ons, uptime checks and alerts.
  • Monitoring for healthcare applications: Monitor patient-facing web applications: availability of booking and portals, keeping personal data out of telemetry, and access control.
  • What is APM (application performance monitoring)?: APM explained: what application performance monitoring measures, how traces and spans work, why p95 beats averages, a worked example and how to start.
  • Service level indicators (SLIs): Save an SLI once from uptime checks, API latency or errors. See it over the last hour, day, week and month, and build SLOs and SLAs on it.

Watch your own site and services with VitalRix

Uptime checks, APM, logs, real-user monitoring, alerts and status pages in one place. Every product has a free tier and no credit card is needed.