Performance counters sucks
A while ago we added monitoring capabilities to RavenDB via performance counters. The intent was to give our users the ability to easily see exactly what is going on with RavenDB.
The actual usage, however, was a lot more problematic.
- Performance counters API can just hang, effectively killing us (since we try to initialize it as part of setup db routine).
- They require specific system permissions, and can fail without them.
- They get corrupted, for mysterious reasons, and then you need to reset them all.
- Even after you created them, they can still die on you for no apparent reason.
I would have been willing to assume that we are doing something really stupid. Except that SignalR had similar issues.
What is worse, it appears that using the performance counters needs to iterate the list of printers on the machine.
This is really ridiculous. And it is to the point in which I am willing to just give it up entirely, if only I had something that I could use to replace it with.
Currently I threw a lot of try /catch and a background thread to hide that, but it is ugly and brittle.