[英]Azure Application Insights Kusto Query - do I need to specify tables? Is there no shortcut for "all tables"?
[英]Dynamic userId in kusto query Application Insights
我是 Azure Application Insights 服务的新手,我想从我的应用程序(使用 Xamarin Forms,c# 开发)获取数据,我需要进行特定查询才能获取用户统计信息并将其显示在我的 Azure 仪表板上。 我可以为所有用户发出此请求,但不能为一个用户发出此请求。 我给你看我的查询
customEvents
| where name == "LoggedUserEvent"
| where timestamp > now() - 31d
| extend Properties = todynamic(tostring(customDimensions.Properties))
| extend userId = todouble(todecimal(Properties.UserId))
| where userId == XXX
| summarize Total = count() by bin(timestamp, 1d)
| project Total, timestamp
此查询运行良好,如您所见,向我显示总计和时间戳
但我应该说明的问题
| where userId == XXX
每次我想要有关特定用户的新数据时,我都必须更新此行,是否有更简单的方法使用输入文本获取此信息,或者如果您有任何建议,销售人员将使用此平台并且需要尽可能简单. 先感谢您。
要实现上述要求,您可以尝试使用page view
方法,这样我们就可以获得登录到您的应用程序的特定用户,而不是使用Custom events
。
查询示例:
pageViews
| project user_Id , timestamp
| summarize max(timestamp) by user_Id
有关更多信息,请参阅以下链接:-
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.