I'm trying to read the Performance Counters in the category "HTTP Service Request Queues" in my Azure worker role application (C#).
By default the application can not get any counter from that category, i.e.
string performanceCategoryName = "HTTP Service Request Queues";
var httpQueueCategory = PerformanceCounterCategory.GetCategories().FirstOrDefault(category => category.CategoryName == performanceCategoryName);
gives null.
However, if I remote desktop in to the instance and start perfmon, I can see the category there. And if I view it from perfmon and then restart the application, then the application can also read the counters. As if perfmon create the counter and it isn't there by default.
Does anybody know of a work around for this?