如何在 App Insights 中呈现同时发生的事件的平均持续时间而不是它们的摘要?

How to render average duration of events falling on the same time instead of their summary in App Insights?

我对一些构建同时启动的构建进行了遥测。这是查询和结果图:

AllBuilds
| project buildDef, startTime, result, runSeconds, runDuration, buildNumber
| where buildDef == 'dayforce-PR-AzureTest'
    and startTime >= todatetime('2021-11-27 04:27')
    and startTime < todatetime('2021-12-03 21:34')
    and result == 'succeeded'
| project startTime, minutes = runSeconds / 60, runDuration, buildNumber
| render columnchart

尖峰代表同时倒下的建筑。添加了它们的构建时间,这不是我想要的。我想取而代之的是平均它们。理想情况下,我更喜欢保留这两个值,但由于它们恰好落在同一时间,我不确定这是否可能。

我尝试添加with (accumulate=false),但似乎没有任何效果。

如果我没理解错的话,你可以尝试使用avg()聚合函数:

AllBuilds
| where buildDef == 'dayforce-PR-AzureTest'
    and startTime >= todatetime('2021-11-27 04:27')
    and startTime < todatetime('2021-12-03 21:34')
    and result == 'succeeded'
| summarize avg(runDuration) by bin(startTime, 1h)
| render timechart