运行 多项指标聚合(Kusto/Application 见解)

Running multiple aggregations on metrics (Kusto/Application Insights)

我正在寻找 运行 针对 Application Insights 实例的 Kusto 查询,该实例将报告按特定时间量分箱但也按自定义 属性 分组的指标。目前,如果我要 运行 一个仅针对特定 属性 的查询,我就可以正常工作,但我想让它正常工作以显示每个 属性 的总计。 这是我目前拥有的:

customMetrics |
where name == 'MetricName' and customDimensions['Key'] == 'Value' |
summarize max(value) by bin(timestamp, 1d)

这里实际的聚合函数没有太大关系

这非常有效,但是,如果我想 运行 同样的事情但忽略自定义 属性,只是 运行 没有那个条件的查询将不起作用,因为它将只取最大值,而不会先按自定义 属性 正确分组。我想要做的工作是让所有可能的值的所有 max() 运行,然后求和然后用 bin(timestamp, 1d) 显示结果。这可能吗?

我基本上想 运行 每天都这样做,总结结果并根据当天的时间戳显示:

customMetrics |
where name == 'MetricName'|
summarize max(value) by tostring(customDimensions['Key'])

如有任何帮助,我们将不胜感激!

我可能误解了您的用例,但是 - 这行得通吗?

已更新 @Avnera 的评论)

customMetrics
| where name == 'MetricName'
| summarize m= max(value) by tostring(customDimensions['Key']), Day = bin(timestamp, 1d)
| summarize sum(m) by Day