小编lmo*_*ale的帖子

Application Insights 查询以获取 2 个自定义事件之间的时间

我正在尝试编写一个查询,该查询将获取两个自定义事件之间的平均时间(按用户会话排序)。我在整个应用程序中添加了自定义跟踪事件,我想查询用户从“设置”事件到“处理”事件所需的时间。

let allEvents=customEvents
| where timestamp between (datetime(2019-09-25T15:57:18.327Z)..datetime(2019-09-25T16:57:18.327Z))
| extend SourceType = 5;
let allPageViews=pageViews
| take 0;
let all = allEvents
| union allPageViews;
let step1 = materialize(all
| where name == "Setup" and SourceType == 5
| summarize arg_min(timestamp, *) by user_Id
| project user_Id, step1_time = timestamp);
let step2 = materialize(step1
| join
    hint.strategy=broadcast                      (all
    | where name == "Process" and SourceType == 5
    | project user_Id, step2_time=timestamp
)
on user_Id
| where step1_time < step2_time
| …
Run Code Online (Sandbox Code Playgroud)

azure-application-insights

6
推荐指数
1
解决办法
2万
查看次数

标签 统计

azure-application-insights ×1