Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Debug and troubleshoot Azure Container Apps and Function Apps using logs, KQL, and health checks.
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
references/kql-queries.md
1# KQL Query Reference23Essential Kusto Query Language (KQL) queries for diagnosing Azure application issues.45## Prerequisites67- Application Insights or Log Analytics workspace configured8- Diagnostic settings enabled on Azure resources910---1112## Recent Errors1314```kql15// Recent errors16AppExceptions17| where TimeGenerated > ago(1h)18| project TimeGenerated, Message, StackTrace19| order by TimeGenerated desc20```2122## Failed Requests2324```kql25// Failed requests26AppRequests27| where Success == false28| where TimeGenerated > ago(1h)29| summarize count() by Name, ResultCode30| order by count_ desc31```3233## Slow Requests3435```kql36// Slow requests37AppRequests38| where TimeGenerated > ago(1h)39| where DurationMs > 500040| project TimeGenerated, Name, DurationMs41| order by DurationMs desc42```4344## Dependency Failures4546```kql47// Dependency failures48AppDependencies49| where Success == false50| where TimeGenerated > ago(1h)51| summarize count() by Name, ResultCode, Target52```5354---5556## Tips5758- Always include time filter: `TimeGenerated > ago(Xh)`59- Limit results with `take 50` for large datasets60- Use `summarize` to aggregate data before analyzing6162## More Resources6364- [KQL Quick Reference](https://learn.microsoft.com/azure/data-explorer/kql-quick-reference)65- [Application Insights Queries](https://learn.microsoft.com/azure/azure-monitor/logs/queries)66