Today there are event counters for System.Runtime: https://learn.microsoft.com/en-us/dotnet/core/diagnostics/available-counters#systemruntime-counters
Metrics should be added to this area. Advantages:
- Metrics has new features such as tags (allows for dimensions) and histograms.
- Easier for tests and libraries to listen to and consume with
MeterListener.
- Some libraries only support collecting custom counters that use
System.Diaganostics.Metrics. For example, opentelemetry-net.
What instruments should we have?
- Existing System.Runtime event counters provide a good starting place.
- Some of these counters could be combined by using tags.
- Or tags could provide more information. For example, should the
exception-count counter include the exception type name as a tag? Then tooling can provide a breakdown of not just the total exception count but the exception count grouped by type.
- OpenTelemetry has specs with conventions for counters that a system provides. We should try to provide the same data. Note that counter and tag names don't need to match. We should use .NET conventions.
Today there are event counters for System.Runtime: https://learn.microsoft.com/en-us/dotnet/core/diagnostics/available-counters#systemruntime-counters
Metrics should be added to this area. Advantages:
MeterListener.System.Diaganostics.Metrics. For example,opentelemetry-net.What instruments should we have?
exception-countcounter include the exception type name as a tag? Then tooling can provide a breakdown of not just the total exception count but the exception count grouped by type.