I am adding an Azure Application Service Plan to my resource group. I'd like it to be a Linux Host for a .NET Core 3 Web API. Furthermore, I'd like to use Application Insights. However, when using the Azure Portal, the option to add Application Insights to a Linux .NET Core 3 application is greyed out. Does Application Insights not currently support. I have another Linux Web App that is using Node LTS as it's runtime and that allowed me to add Application Insights with no issue. Is there something special I need to do to add Application Insights to a .NET Core 3 Web API running in an Azure Linux Web App?
3 Answers
Code-less enablement of Application Insights for Asp.Net core is not yet supported for linux. You need to do code-based enablement, which involves installing SDK nugets to your project as documented below: https://docs.microsoft.com/en-us/azure/azure-monitor/app/asp-net-core
According to the docs, yes!
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.