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://learn.microsoft.com/en-us/azure/azure-monitor/app/asp-net-core
Update: Linux support is added for .NET 6.0 onwards. Check doc: https://learn.microsoft.com/azure/azure-monitor/app/azure-web-apps-net-core?tabs=Linux%2Cwindows

- 2,818
- 1
- 13
- 25
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.

- 3,092
- 2
- 20
- 39
-
I have updated my question to include the screenshots of what I am seeing, do you know if there is an explanation for what I am seeing there? I read the docs and it looks like there should be no issue, but, for some reason, I can't create the App Insights instance with the Web App in this configuration. I wonder if this is an Azure bug, or is there a reason? – BigDevJames Dec 10 '19 at 15:07
-
Ooops, you're right. experiencing the same issue. If you have some patience, add an issue on the docs page's bottom. Would you be able to setup your AppInsights environment in a seperate step and only use the it's API key in you code? This should work as that's afiak the only magic behind. – Falco Alexander Dec 10 '19 at 15:17
-
I definitely can, I just was worried that if I wasn't allowed to from the portal automatically, would I run into issues later because something wasn't bound correctly to the instance. – BigDevJames Dec 10 '19 at 15:34
Auto-instrumentation for Application Insights for .NET Core apps is a high priority and work is planned to support the functionality. Stay tuned! Your feedback and patience are greatly appreciated! :)

- 19
- 1
-
2Is this still something that's in the works? I still cannot see it being auto instrumented nor an option to enable it. – Ashwin Jul 26 '20 at 18:01