4

The Azure App service UI used to have an ability to inspect 5xx errors directly. Since we starting using Azure, the UI has been changing almost constantly though, and this ability seems to have disappeared.

We are seeing some 5xx errors, and without bug reports, I'm wanting to get in to our application code and fix whatever crashes aren't being reported by users.

The log stream doesn't provide any useful information, so I'm left wondering here. What's a good way to get at the specifics of server-side errors that are occurring?

3 Answers 3

5

To get the most detail on your errors you want to hook up your web app to App Insights. This will collect all this data and give you a (relatively) easy way to delve into them. App Insights has a free tier and you can enable it for basic monitoring without changing your app. See here.

Another area to look at is in Kudu. If you go to Advanced Tools (Kudu) in the portal, you can browse the content of your site and look in the logs folder. 500 Errors will usually show up in the event log.

Finally, if you click on the "Diagnose and solve problems" link and go to "availability and performance" the new diagnostic tool is actually pretty good at showing you errors and what causes them

11
  • Ah yes, I had looked at the app insights, but held back on enabling it due to not wanting to force a server restart. I will take a look at doing this when we're off peak use on our app. Thanks! Jan 16, 2019 at 21:30
  • I did look at the new diagnostics tool. It's neat, and it's showing me the URLs that are causing problems. But I really need the stack trace for whatever exception caused the 5xx error. Jan 16, 2019 at 21:33
  • 1
    ok, if you want stack traces you want to either look at app insights, or in the Kudu event log
    – Sam Cogan
    Jan 16, 2019 at 21:33
  • Yep. I'm really digging into the Kudu logs now. Thanks! Jan 16, 2019 at 21:34
  • 1
    @ardave all the dataa used by the diagnosis service comes from ther web app logs, which can be viewed using Kudu, or exported to storage accounts.
    – Sam Cogan
    Apr 19, 2019 at 20:14
0

You can utilize an alert mechanism for create Azure App service.As soon as you encounter any Http5xx errors it can trigger certain alert to intimate you. Alert can be integrate with Action group also( which notifies you ) Notification option Email, SMS, LogicApp FunctionsApp Runbook ITSM Webhook

Hope it helps

Refernces: https://docs.microsoft.com/en-us/azure/azure-monitor/platform/alerts-metric-create-templates https://docs.microsoft.com/en-us/azure/azure-monitor/platform/alerts-metric-near-real-time https://docs.microsoft.com/en-us/azure/app-service/web-sites-monitor

0

This is to clarify how to view a live 5xx error in Azure using Kudu:

  1. Go to Advanced Tools - > Kudo.

  2. Select "Log Streaming" and wait for it to load.

  3. Reproduce the 5xx error.

  4. You will see the error details appear live in the log.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .