Application Insights Analytics - 图表 X 轴

Application Insights Analytics - Chart X axis

如何为查询呈现图表

performanceCounters
| where name == "% Processor Time" 
| summarize avg(value) by bin(timestamp, 5s),cloud_RoleInstance 

我每 5 秒而不是每 1 分钟得到一分?

定期(大约 1 分钟)收集性能计数器,bin 函数的作用会将时间戳移动到最近的 5 秒间隔。您所看到的是因为计数器收集间隔,您不会得到那种粒度。您需要实现自己的模块才能做到这一点。

https://github.com/Microsoft/ApplicationInsights-dotnet-server/blob/v2.3.0/Src/PerformanceCollector/Shared/PerformanceCollectorModule.cs#L49