gpt4 book ai didi

azure - 在 Azure webjob 的 Appinsights 中添加新的自定义指标,例如 "Memory Usage"

转载 作者:行者123 更新时间:2023-12-03 05:03:15 29 4
gpt4 key购买 nike

我们有一个 webapp(api) 和 webjob 托管在 Azure 中。启用 Appinsights 来检查诊断。我们需要获取网络作业的指标以了解内存使用情况。

我们尝试了此链接中给出的所有内容: https://learn.microsoft.com/en-us/azure/application-insights/app-insights-performance-counters

但是,我们无法获取 Azure 应用洞察中的指标。从另一个链接,我们看到在VM中,需要安装sdk/counters。由于我们在网络应用程序中托管,因此无法执行此操作。

如有任何帮助,我们将不胜感激。提前致谢!

--------已编辑只是为了再次澄清这个问题。 AppInsights 当前显示可用内存,该指标显示服务器中剩余的内存量,与正在使用的应用程序无关。有没有一种方法可以将统计数据添加为自定义功能?上面的链接将此指标添加到虚拟机中。

最佳答案

您没有看到进程专用字节(我认为这就是您正在寻找的内容)?在 Analytics 中尝试以下查询。或者,您也可以更改 UI 中的默认选择 - 取决于您查看计数器的方式/位置。

performanceCounters
| where timestamp >= datetime(2018-08-07T18:00:00.000Z) and timestamp < datetime(2018-08-14T18:00:00.000Z)
| where ((category == "Process" and counter == "Private Bytes") or name == "processPrivateBytes")
| extend performanceCounter_value = iif(itemType == 'performanceCounter',value,todouble(''))
| summarize ['performanceCounters/processPrivateBytes_avg'] = sum(performanceCounter_value)/count() by bin(timestamp,3h)
| order by timestamp desc
| render timechart

关于azure - 在 Azure webjob 的 Appinsights 中添加新的自定义指标,例如 "Memory Usage",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51838227/

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