Hi Gawaskar,
Welcome to Microsoft Q&A Forum, thank you for posting your query here!
I can guide you to identify and troubleshoot errors in Azure App Service with Azure Monitor, you’ll want to focus on critical metrics, logs, that reveal application health and performance issues. Here’s a guide to using Azure Monitor to diagnose issues effectively:
Key Metrics to Monitor
Start with these primary metrics to detect and analyze issues:
- CPU and Memory Usage: High CPU or memory usage can cause performance degradation or crashes, often due to resource-intensive operations or memory leaks.
- Request Count: A sudden increase could indicate high demand or potential load-related issues, while a sharp drop may indicate downtime or connectivity issues.
- ·Disk Queue Length: If the app writes data, high queue length can signal disk I/O bottlenecks.
How to View Metrics:
- In Azure Monitor > Metrics, select your App Service and configure relevant metrics. Adjust time frames to identify spikes and trends.
Reference Screenshot below
- Use log query to view Azure Monitor log
View AppServiceHTTPLogs with log query
Now that we've accessed the app, let's view the data associated with HTTP requests, found in the AppServiceHTTPLogs.
- Click Logs from the left-hand navigation.
- Command: AppServiceHTTPLogs
The AppServiceHTTPLogs query returns all requests in the past 24-hours. The column ScStatus contains the HTTP status. To diagnose the HTTP 500 errors, limit the ScStatus to 500 and run the query, as shown below:
Command below:
AppServiceHTTPLogs
| where ScStatus == 500
References: below Microsoft link has how to implement in step-by-step process
Tutorial: Troubleshoot with Azure Monitor - Azure App Service | Microsoft Learn
With these steps, you should be able to identify and troubleshoot errors in Azure App Service with Azure Monitor. Hope this helps!
Please let us know if you have any further queries. I’m happy to assist you further.
Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.