etishor / Metrics.NET

The Metrics.NET library provides a way of instrumenting applications with custom metrics (timers, histograms, counters etc) that can be reported in various ways and can provide insights on what is happening inside a running application.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Move performance counters to the separate library

Sergey-Terekhin opened this issue · comments

I try to use Metrics.Net in the Mono runtime under linux. It's worked, but almost all performance counters are seemed to be broken (Mono has implementation only for limited subset of them). Now I'm working on Metric-dependent library which contains set of extension methods to register mono-specific performance counters.

I think, it would be better to move existing registration of windows-specific performance counters to the separate assembly and Nuget package

Going over the issues today, i've noticed that my response to your suggestion was somehow lost. Sorry for that, I'll re-post now.

I'm aware most counters are not implemented on the mono platform, but hopefully that will change in the future. Moving them to a separate package would make them harder to discover for windows users. I really like the fact that (at least on windows) you can view cpu/mem and all the other app and machine counters out-of-the-box, and would really like to keep it this way.

I agree it is a bit annoying on mono and I'm willing to try to make it less annoying.

I'll investigate a few options:

  1. If the Environment is Mono and the counter is not found, don't log and error message.
  2. Define a set of performance counters that are known to be cross-platform and have separate extension methods for the platform specific counters (this might be hard to keep up to date)

Besides the logged message you have any other issues with the performance counters that are not available on mono?

This commit 73fdd1f disables logging an error on mono if the counter is not found.

I'll close this for now. Feel free to re-open if necessary.