Application Insights 能否与 Linux Web App 运行 .NET Core 3 运行时一起使用?

Can Application Insights be used with a Linux Web App running .NET Core 3 runtime?

我正在向我的资源组添加 Azure 应用程序服务计划。我希望它成为 .NET Core 3 Web Linux 的主机 API。此外,我想使用 Application Insights。但是,在使用 Azure 门户时,将 Application Insights 添加到 Linux .NET Core 3 应用程序的选项显示为灰色。 Application Insights 目前不支持。我有另一个 Linux Web 应用程序,它在运行时使用 Node LTS,这让我可以毫无问题地添加 Application Insights。我需要做些什么来将 Application Insights 添加到 Azure Linux Web 应用程序中的 .NET Core 3 Web API 运行?

编辑: 这是我所看到的一些屏幕截图

根据docs,是的!

Supported scenarios The Application Insights SDK for ASP.NET Core can monitor your applications no matter where or how they run. If your application is running and has network connectivity to Azure, telemetry can be collected. Application Insights monitoring is supported everywhere .NET Core is supported. Support covers:

Operating system: Windows, Linux, or Mac. Hosting method: In process or out of process. Deployment method: Framework dependent or self-contained. Web server: IIS (Internet Information Server) or Kestrel. Hosting platform: The Web Apps feature of Azure App Service, Azure VM, Docker, Azure Kubernetes Service (AKS), and so on. .NET Core Runtime version: 1.XX, 2.XX, or 3.XX IDE: Visual Studio, VS Code, or command line. Note

If you are using ASP.NET Core 3.0 along with Application Insights, please use the 2.8.0 version or higher. This is the only version that supports ASP.NET Core 3.0.

linux 尚不支持 Asp.Net 核心的 Application Insights 无代码启用。 您需要执行基于代码的启用,这涉及将 SDK nugets 安装到您的项目中,如下所述: https://docs.microsoft.com/en-us/azure/azure-monitor/app/asp-net-core

更新: Linux 添加了对 .NET 6.0 及更高版本的支持。检查文档: https://docs.microsoft.com/azure/azure-monitor/app/azure-web-apps-net-core?tabs=Linux%2Cwindows

.NET Core 应用程序的 Application Insights 自动检测是一个高优先级,计划开展工作以支持该功能。敬请关注!非常感谢您的反馈和耐心! :)