gpt4 book ai didi

c# - Azure web.app AI : Performance counter is not available in the web app supported list

转载 作者:行者123 更新时间:2023-12-03 03:00:22 25 4
gpt4 key购买 nike

我的 Azure web.app (s3) 存在内存泄漏。为了进行调查,我想向应用程序洞察中添加更多 PerformanceCounter。

但我无法让它发挥作用。

这是我添加的 ApplicationInsights.config。(https://stebet.net/monitor-your-net-garbage-collector-using-application-insights/)

<Add Type="Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector.PerformanceCollectorModule, Microsoft.AI.PerfCounterCollector">
<Counters>
<Add PerformanceCounter="\.NET CLR Memory(??APP_CLR_PROC??)\# Bytes in all Heaps" ReportAs="Bytes in all Heaps" />
</Counters>
</Add>

我将新计数器添加到 ApplicationInsights.config 并部署到 azure web.app。在 Portal 中我看不到任何数据并发现错误。

AI:性能计数器在网络应用程序支持列表中不可用。计数器为\Process(??APP_WIN32_PROC??)\所有堆中的字节数。

请帮我了解问题所在。

谢谢,亨里克

最佳答案

Please help me understand what is the problem.

我们可以从System performance counters in Application Insights得到答案.

Azure Web Apps 的性能计数器不可用

Application Insights can show these performance counters if your application is running under IIS on an on-premises host or virtual machine to which you have administrative access.But you can send Azure Diagnostics to Application Insights.

但是我们可以使用Application Insight API来获取数据,我们需要create a Apikey 。我们还可以从 document 获取演示代码。我之前做过一个demo,更详细的信息可以引用另一个SO thread .

关于c# - Azure web.app AI : Performance counter is not available in the web app supported list,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49413314/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com