-
Notifications
You must be signed in to change notification settings - Fork 121
Add performance collector module for aspnet.core #470
Comments
This is kind of the same as #460. |
Note that there is no support for performance counters even on Windows in .NET Core. |
Do you have an updated eta on this one, this really hinders us from migrating from aps.net to asp.net core as we loose a lot of insights in how our apis are behaving. And more generally, how is progress of this entire repo coming along, both beta1 & beta2 has passed their due dates... |
@JonasSamuelsson Application Insights does not collect perf counters on asp.net core, because .net core does not have a concept of Performance Counters yet. Once .net core provides this feature, application insights will surely support it. There are several discussions on dotnet core Github repo about perf counters support ..like |
@JonasSamuelsson Regarding releases of next version. Apologies for not updating the release dates, we (and other ApplicationInsights sdk which this depends on )faced certain infra issues that caused the delay. |
https://www.nuget.org/packages/System.Diagnostics.PerformanceCounter/ Need to look at this to see if we can support perf counters in netstandard. |
I would greatly appreciate this. Running Linux containers and I cannot see perf counters because it is dotnet core. |
Looks like it will be released in 2.4.0! |
@aligneddev https://github.com/Microsoft/ApplicationInsights-aspnetcore/blob/develop/CHANGELOG.md#version-240-beta1 |
https://www.nuget.org/packages/System.Diagnostics.PerformanceCounter/4.5.0 - Now that System.Diagnostics.PerformanceCounter stable is out, we may want to conside modifying ApplicationInsights to use this, and start supporting counters for asp.net core apps. |
I got this working in an ASP.net core 2 project as a quick workaround by forking ApplicationInsights-dotnet-server and adding a netstandard 2.0 target & having a conditional reference to the above nuget (https://www.nuget.org/packages/System.Diagnostics.PerformanceCounter/4.5.0) to the Perf project. The commit is here https://github.com/nhart12/ApplicationInsights-dotnet-server/commit/123b97aa78185eca24b24b7b8c841f7581acf72d |
@nhart12 will this then also work for Linux or is all of this pure Windows again? |
@cijothomas OK is there an issue that is being tracked for Linux? |
@rh78 This issue is for both linux/windows. |
@cijothomas OK cool thank you - is there an estimate on when we can expect tracking support for CPU/memory/etc. on Linux? |
The team has work planned to collect process level counters for all platforms (linux+windows) by June/July 2019 time frame. We are working with the .net core team to align with their future plans for counters in general. Will share more info as we start working on this and this is only an estimated date now. |
It's a tragedy. It renders AI useless for production use as a monitoring tool, because stats are only meaningful when being accompanied with low level stats as CPU and memory consumption. I am looking forward for a change - all the best! |
I created PR over here. I'm sure there is more to be done to target netstandard 2.0 on some of the other projects, but this got it working for me. |
@nhart12 's PR is merged and will be released as beta3 |
@cijothomas we've upgraded one of our web applications to beta3, we see CPU and RAM information for Kestrel hosted applications, but not when they are deployed to IIS. Is this expected? I was hoping we would get that information no matter how the web server. |
@twurm No its no expected. Perf Counters should work irrespective of Web Server. Can you create a new issue to track this better? Please include as much details as you can share. |
@twurm make sure the user the app pool is running as has access to perf counters |
@nhart12 that's probably the problem, we are running the app pools as: ApplicationPoolIdentity. I'll take a look on Monday. |
This is addressed for Windows in 2.7. Closing this. |
At present, performance collector module exists only if run against full framework. (means there won't be any counters collected when running in linux/mac)
The proposal is to modify performance collector to run in pure .net core, collecting perf counters the usual way from windows environments, and implementing new way to collect counters from unix environments. The new way would be similar to how perf counters are collected from Azure Web Apps - instead of reading the special ENV variables exposed by Azure WebApps, we can linux specific commands like netstat etc.
The text was updated successfully, but these errors were encountered: