Azure Application Insights - 按部分时间戳汇总

Azure Application Insights - Summarize by part of timestamp

如何仅按年、月、日和小时汇总记录?

在 Application Insights 分析中:

按小时计算:

requests 
 | summarize count() by bin(timestamp, 1h) 

白天:

requests 
 | summarize count() by bin(timestamp, 1d) 

按月

requests 
  | summarize count()  by bin(datepart("Month", timestamp), 1) 

按年份

requests 
  | summarize count()  by bin(datepart("Year", timestamp), 1)