azure - Azure Web App 中的可用计数器

标签 azure azure-web-app-service azure-application-insights

我们正在尝试查明一些内存问题,为此我们需要在应用程序洞察分析数据中添加额外的计数器,可以帮助我们解决问题的计数器是

\Memory\Page Faults /sec
\Memory\Page Reads /sec
\Memory\Cache Faults /sec
\Memory\Available Bytes
\Paging File(*)\% Usage Peak
\Process(??APP_W3SVC_PROC??)\Working Set Peak
\Process(??APP_W3SVC_PROC??)\Working Set - Private

如果我在 ApplicationInisights.config 中添加此计数器,我会收到消息

AI:性能计数器在 Web 应用程序支持列表中不可用。计数器是 $CounterName

因此,该进程没有权限获取性能计数器。

我有以下问题:

  • 如何添加计数器 Process Page Faultsapplicationinishgts.config以便将其存储到分析门户中(我尝试了此 \Memory(??APP_W3SVC_PROC??)\Page Faults /sec 但它不起作用)。它显示在实时矩阵流中,因此这是可能的
  • 如果我尝试使用 powershell 或类似工具在启动时授予 WWW 进程权限,会有帮助吗?或者这不起作用(未实现/按设计..)
  • 是否有可在 Azure Web App 中使用的性能计数器列表?
  • 在实时流中 - 显示进程 CPU(所有核心的百分比总和)(但无法更改),这显然是全局计数器 - 由于上述计数器非常有用,可以以类似的方式添加这些计数器吗?

最佳答案

Application Insights 在 Azure WebApps 中运行时能够收集计数器的子集。没有支持列表的文档,但这是代码。

https://github.com/Microsoft/ApplicationInsights-dotnet-server/blob/4093e9a6d350a9d4759eb64a2be17a90dc23f85a/Src/PerformanceCollector/Perf.Shared.NetFull/Implementation/WebAppPerformanceCollector/CounterFactory.cs#L21

上面未列出的任何计数器都不会在 Web 应用程序中收集。

关于azure - Azure Web App 中的可用计数器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49670113/

相关文章:

Azure Function App 消耗,使用 Azure Blob 存储 V1 或 V2

azure - 在 Azure 辅助角色内调用 exe

c# - Azure Web App HTTP 响应大小限制?

c# - 需要从类库读取值App.config

azure - 如何将分析中的图表固定为 azure 门户应用程序洞察资源中的最爱

azure - Dynamics 365 for Operations 虚拟机可访问性

已达到 Azure Batch 池配额

Azure应用程序服务不断从docker hub提取docker镜像

azure - 应用程序见解 Java 代理 : Which Certificates to add to truststore?

azure - Azure功能监控定价的计算