使用 Application insights 监控我的 Azure 功能

Monitor my Azure function with Application insights

我正在尝试监控我的 azure 函数以记录性能洞察和发生的任何错误。由于我是 Azure 的新手,我了解到 Azure Insights 可以做到这一点。

我使用了一些设置来启用它。

Windows:

XDT_MicrosoftApplicationInsights_Java -> 1
ApplicationInsightsAgent_EXTENSION_VERSION -> ~2

Linux:

ApplicationInsightsAgent_EXTENSION_VERSION -> ~3

我正在寻找更多详细信息。

我们需要在您的 azure 函数应用程序中添加提到的应用程序设置,如下所示:

检查您使用的 Azure 功能计划。如果是 linux 消费计划,请确保在您的函数应用程序的应用程序设置中添加以下键及其值。

APPLICATIONINSIGHTS_ENABLE_AGENT: true

如果它是一个 python 功能应用程序然后检查这个 GIT and MS Doc for monitoring azure function