Azure Diagnostics
Systematic guidance for debugging Azure production issues using AppLens, Azure Monitor, and resource health checks.
When to Use
Activate this skill when troubleshooting:
- Production failures in Container Apps, Function Apps, or AKS
- Application errors requiring log or metric analysis
- Infrastructure issues like image pull errors or cold start problems
- Kubernetes connectivity or pod scheduling issues
Core Diagnostic Approach (5 Steps)
- Identify symptoms — Determine what's failing and when
- Check resource health — Verify Azure service status for the affected region
- Review logs — Examine diagnostic information via AppLens or Monitor
- Analyze metrics — Identify performance patterns and anomalies
- Investigate changes — Assess recent deployments, configuration changes
Service-Specific Guidance
Container Apps
Common issues and investigation paths:
- Image pull failures — Check registry access, credential rotation
- Cold starts — Review min replicas, scaling rules
- Health probe failures — Verify probe endpoints and response times
Function Apps
Common issues and investigation paths:
- Invocation failures — Check function logs and exception details
- Timeouts — Review function duration vs. host timeout setting
- Binding errors — Verify connection strings and managed identity permissions
- Cold start delays — Consider Premium plan or Always Ready instances
AKS
Common issues and investigation paths:
- Cluster access — Verify kubeconfig and RBAC permissions
- Node problems — Check node status, resource pressure, kubelet logs
- DNS failures — Review CoreDNS pods, network policies
- Upgrade complications — Check node pool upgrade status, PDB violations
Diagnostic Tools
| Tool | Capability |
|---|---|
| AppLens | Automated issue detection and root cause analysis |
| Azure Monitor | KQL queries against logs and metrics |
Sample KQL Queries
// Container App failures in the last hour
ContainerAppConsoleLogs
| where TimeGenerated > ago(1h)
| where Log contains "error" or Log contains "exception"
| project TimeGenerated, ContainerAppName, Log
// Function App exceptions
FunctionAppLogs
| where TimeGenerated > ago(1h)
| where Level == "Error"
| project TimeGenerated, FunctionName, Message, ExceptionDetails
CLI Commands
# Container Apps
az containerapp logs show --name <app> --resource-group <rg> --follow
# Function Apps
az functionapp log deployment show --name <app> --resource-group <rg>
# AKS
kubectl logs <pod-name> --previous
kubectl describe pod <pod-name>
kubectl get events --sort-by='.lastTimestamp'
Installation
npx skills add https://github.com/microsoft/azure-skills --skill azure-diagnostics
Mirrored from https://github.com/microsoft/azure-skills — original author: microsoft, license: MIT. This is an unclaimed mirror. Content and ownership transfer to the author when they claim this account.