microsoft / ApplicationInsights-dotnet-server

Microsoft Application Insights for .NET Web Applications
https://azure.microsoft.com/services/application-insights/
133 stars 67 forks source link

Support Cross-Platform CPU and Memory counters. #1195

Closed cijothomas closed 5 years ago

cijothomas commented 5 years ago

Fix #1189

@SergeyKanzhelev @Dmitry-Matveev @lmolkova @MS-TimothyMothra Please share your thoughts.

Some highlights:

  1. XPlatform counters currently support just 3 - process cpu, process cpu normalized, process/private bytes.
  2. There are no public API changes - users still configure counters as before. Underneath we use StandardPerfCollection or Web App or something else like In-Proc stats, EventCounters - users are abstracted from this as of this PR. (this will change soon when we start supporting more counters.)
  3. I have manually tested this in windows and linux. LiveMetrics also work in Linux now, showing process cpu/memory.

    Will eventually enable Linux CI builds for this repo to get automatic tests.

TimothyMothra commented 5 years ago

I see a lot of methods with platform preprocessors (NET45, NETSTANDARD, etc). I wonder if we would be better off writing a factory that returns a specific class based on framework.

what do you think?