Enable Application Logging and Diagnostics for Azure App Service
Configure diagnostic logging for an Azure App Service web app, stream logs in real-time, route them to Log Analytics, and write KQL queries to troubleshoot errors.

Lab overview
Azure App Service generates multiple categories of diagnostic data - HTTP request logs, application-level output, console messages, and platform events - but none of these are captured or retained by default. Without deliberate configuration, errors vanish after they scroll past the console buffer, and performance issues go undetected until users complain.
In this lab, you will enable application logging on a pre-provisioned App Service web app, configure diagnostic settings to send logs to a Log Analytics workspace, observe log output in real-time using the Log Stream feature, and write KQL queries against the AppServiceHTTPLogs table to identify 5xx errors and slow requests.
Objectives
Upon completing this intermediate level lab, you will be able to:
- Enable application logging (filesystem) on an Azure App Service web app
- Configure diagnostic settings to route HTTP logs, console logs, and application logs to a Log Analytics workspace
- Stream application logs in real-time using the Azure portal Log Stream feature
- Write KQL queries against the AppServiceHTTPLogs table to identify and analyze 5xx server errors
- Query Log Analytics to find slow requests using response time percentile analysis
- Correlate HTTP logs with console logs to troubleshoot application issues
Who is this lab for?
This lab is designed for:
- Cloud engineers preparing for the AZ-104 or AZ-204 certification who need hands-on experience with App Service monitoring
- Administrators learning to configure diagnostic logging and troubleshoot web application issues
Verified against your live environment
An automated validation engine inspects your actual resources and configurations as you work. Completion means the task was performed, not multiple choice, real-world proficiency.
More labs like this
Creating a Web App on Azure App Service using Azure Portal
Learn how to create, configure, and deploy a web application using Azure App Service through the Azure Portal's interface.
Getting Started with Azure Application Insights for App Service Monitoring
Learn to enable Application Insights on Azure App Service, explore live metrics and application maps, and analyze failures and performance to monitor your apps.
Configure Azure Monitor Alerts and Action Groups for App Service
Create metric alerts, log search alerts, and action groups to monitor an Azure App Service and respond to threshold breaches.
Related reading
Environment
Every lab includes
- Real environment, pre-credentialed
- Automated checks on every step
- Isolated sandbox, auto cleanup
- AI-recommended next steps
Lab curriculum
- 01
Logging into Azure Account using Azure Portal
- 02
Enable App Service Application Logging (Filesystem)
1 automated check
- 03
Configure Diagnostic Settings to Route Logs to Log Analytics
1 automated check
- 04
Write KQL Queries to Troubleshoot Errors and Slow Requests
1 automated check
Skills validated
Not the lab you were looking for?
Browse 200+ hands-on labs across AWS, Azure, Kubernetes, Docker, and cloud security.