[英]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.