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?
EDIT: Here are some screenshots of what I am seeing
Select File | New Project. Select Visual C# | . NET Core | ASP.NET Core Web Application, ensure to mark the checkbox Add Application Insights to Project. Click Ok on the next screen.
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
Update: Linux support is added for .NET 6.0 onwards. Check doc: https://docs.microsoft.com/azure/azure-monitor/app/azure-web-apps-net-core?tabs=Linux%2Cwindows
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With