newrelic / nri-perfmon

Windows Perfmon / WMI On-Host Integration for New Relic Infrastructure
Other
13 stars 19 forks source link

Allow for counters without instances. #17

Closed brunotag closed 4 years ago

brunotag commented 4 years ago

Some counters don't have instances, but they still make sense. For instance ASP.NET.

Microsoft allows for that (GetCounters("") works when GetInstanceNames().Length == 0), so this change enables such counters to be reported as well.

At the moment such counters are skipped instead.

CLAassistant commented 4 years ago

CLA assistant check
All committers have signed the CLA.

brunotag commented 4 years ago

notice I've mainly lifted and shifted logic that was already there. The main difference with the previous approach is to gather the counter's values even if the there are no instances, instead of skipping it.

brunotag commented 4 years ago

cc: @sschwartzman