0

i'm noob to Kusto, can anyone share how to get the operation/exception that caused failed request (5xx http) in Azure Application Insight log with starttime & endtime provided ?

Many thanks in Advance.

Mike Ng
  • 1
  • 1

1 Answers1

0

In Azure portal Application Insights navigate to logs tab and add the below query (In your case resultCode is 5XX)

requests
| where resultCode == 404
| summarize Count=sum(itemCount) by url
| sort by Count

Below is screenshot from the portal: enter image description here

Also refer to this swinburger blog, and this SO thread.

SaiKarri-MT
  • 1,174
  • 1
  • 3
  • 8
  • Thanks @Saikarri, but what i'm looking for is the operation/exception which caused the failed http code (5xx), not the url – Mike Ng Dec 21 '21 at 09:12
  • Hello @MikeNg, The mentioned steps are general procedure for querying the data in Application Insights. Check this [blog](https://mishrasmrutiranjan.blog/2019/05/31/querying-data-from-multiple-application-insights/) and [MS Docs](https://learn.microsoft.com/en-us/azure/azure-monitor/essentials/app-insights-metrics) to customize queries according to your requirement – SaiKarri-MT Dec 21 '21 at 09:24