在 Azure Application Insights 中查看零视图的 Azure Web 应用页面
See Azure web app pages with zero views in Azure Application Insights
如果有可能...
目标:查看我的 Azure Web 应用程序中每个页面的浏览量报告,并包括获得零浏览量的页面
目前,我已成功创建 Azure Application Insights 中的页面浏览量报告(基于默认报告,显示所有页面 >= 1 个视图。我想在该报告中包含具有 0 个视图的页面。
这是我在日志中使用的查询的基本版本:
pageViews
| where timestamp between(datetime("2020-03-06T00:00:00.000Z")..datetime("2020-06-06T00:00:00.000Z"))
| summarize Ocurrences=count() by tostring(url)
这些页面位于 Azure 网络应用程序中。
有谁知道如何使用这种方法或我没有想到的其他方法来完成此操作?感谢您的帮助。
如果页面的客户端视图为零,则意味着客户端没有 "page view" 遥测数据发送到应用程序见解。因此,application insights 不会收集这些零浏览页面 url。
如果您想将这些零浏览页面添加到您的报告中,您应该在查询中硬编码这些零浏览页面网址。
这里有一个例子,我用的是datatable operator and union operator:
//use thie query to add the zero-viewd page url in this datatable
let query1=datatable (url:string,Ocurrences:long)
[
"https://localhost:44364/home/url1",0,
"https://localhost:44364/home/url2",0,
"https://localhost:44364/home/url3",0,
];
//use the query below for non-zero-viewd page
let query2=pageViews
| summarize Ocurrences=count() by tostring(url);
//union the 2 queries
union withsource=TableName query1,query2 | project url,Ocurrences
测试结果如下:
如果有可能...
目标:查看我的 Azure Web 应用程序中每个页面的浏览量报告,并包括获得零浏览量的页面
目前,我已成功创建 Azure Application Insights 中的页面浏览量报告(基于默认报告,显示所有页面 >= 1 个视图。我想在该报告中包含具有 0 个视图的页面。
这是我在日志中使用的查询的基本版本:
pageViews
| where timestamp between(datetime("2020-03-06T00:00:00.000Z")..datetime("2020-06-06T00:00:00.000Z"))
| summarize Ocurrences=count() by tostring(url)
这些页面位于 Azure 网络应用程序中。
有谁知道如何使用这种方法或我没有想到的其他方法来完成此操作?感谢您的帮助。
如果页面的客户端视图为零,则意味着客户端没有 "page view" 遥测数据发送到应用程序见解。因此,application insights 不会收集这些零浏览页面 url。
如果您想将这些零浏览页面添加到您的报告中,您应该在查询中硬编码这些零浏览页面网址。
这里有一个例子,我用的是datatable operator and union operator:
//use thie query to add the zero-viewd page url in this datatable
let query1=datatable (url:string,Ocurrences:long)
[
"https://localhost:44364/home/url1",0,
"https://localhost:44364/home/url2",0,
"https://localhost:44364/home/url3",0,
];
//use the query below for non-zero-viewd page
let query2=pageViews
| summarize Ocurrences=count() by tostring(url);
//union the 2 queries
union withsource=TableName query1,query2 | project url,Ocurrences
测试结果如下: