I setup our on-premises .NET application running on IIS with Azure's Application Insights by following this Microsoft article . and it has been working great.
From what I understand this is a non-intrusive, code-less monitoring method which designed to add onto application that is already deployed and running in Production.
Then I came across this article about AddApplicationInsightsTelemetry . It indicates this is needed for code base monitoring on .NET Core application.
I'm a little confused while Goolging around trying to find what is the different between two methods, does this mean they both really do the same thing and that AddApplicationInsightsTelemetry()
is only needed for .NET Core?
Do I need to add this to my web .NET application because one sub component used is written using .NET Core?
According to the comments mentioned by gunr2171, I summarized the answer(for community members) below:
If the application is .Net Framework, we just need to download and run "Application Insights Status Monitor" and follow the steps in this document which provided by Fylix. This solution is codeless but just for .Net Framework and deployed on IIS(shown as below screenshot)
If the application is .Net Core, we need to follow this document , add "Microsoft.ApplicationInsights.AspNetCore" sdk to the project and use "AddApplicationInsightsTelemetry" in Startup class. We can also customize the Application Insights SDK in ConfigureServices() method of Startup.cs class.
There are 2 ways to enable Application Insights to an application:
Code-Less approach is supported in Azure Web Apps for Asp.Net and Asp.Net Core apps. ( https://docs.microsoft.com/en-us/azure/azure-monitor/app/azure-web-apps?tabs=net ) with upcoming support for other languages like Java, Node.Js, Python.
Code-Less approach is supported in Azure VMs for Asp.Net ( https://docs.microsoft.com/en-us/azure/azure-monitor/app/azure-vm-vmss-apps )
Code-Less approach is supported in any on-prem server for Asp.Net Apps.( https://docs.microsoft.com/en-us/azure/azure-monitor/app/status-monitor-v2-overview )
If you are having an Asp.Net Core application, then the only place where code-less approach is supported is in Azure Web Apps. For every other places, you need to code-based approach ( https://docs.microsoft.com/en-us/azure/azure-monitor/app/asp-net-core )
If you are having Asp.Net application, code-less is supported in Azure Web Apps, Azure VMs, On-Prem. You can still use code-based approach ( https://docs.microsoft.com/en-us/azure/azure-monitor/app/asp-net ), if you want to customize the telemetry collection.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.