'How do you create a report with every URL hit between two date/time's in an Azure web app?
I have an Azure web app with Application insights. I need a report that shows every URL hit, when, and if possible, how long it took to execute. In Pseudo code, something like this
select URL, Date, Duration from WebSite where Date between '1 April 2022 08:00:00' and '2 April 2022 08:00:00'
Results would look like this:
/page1 '1 April 2022 08:01:23' 203ms
/page3 '1 April 2022 08:02:03' 103ms
/page2 '1 April 2022 08:02:04' 83ms
/page5 '1 April 2022 08:03:08' 93ms
Is this possible? If so, what is the query?
Solution 1:[1]
I recommend getting this report directly from the app service HTTP logs because data in Application Insights can be sampled depending on how it is configured for your infrastructure.
In order to get the report from app service logs, go to the app service and select "Logs" in the left-hand side menu. Then use the following query:
AppServiceHTTPLogs
| where TimeGenerated between (datetime(2022-04-01T00:00:00Z) .. 1d)
| project CsUriStem, TimeGenerated, TimeTaken
You can specify the date range directly in the query or select it in the "Time range" dropdown:

If you want to run a similar report by using Application Insights data, the query will look like this:
requests
| where cloud_RoleName == 'your app service role name'
| where timestamp between (datetime(2022-04-01T00:00:00Z) .. 1d)
| project url, timestamp, duration
Please note that you may need to filter by cloud_RoleName or cloud_RoleInstance if multiple app services are connected to the same Application Insights resource.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Anna Gevel |
