I am planning to use PerformanceCounter for one of my project. I knew only about Microsoft.Diagnostics. However I stumbled upon a rather newer library Microsoft.Diagnostics.EventFlow under official Microsoft Azure project which seem to provide similar functionality.
I am unfamiliar with Azure services and its libraries, so apologies if these two libraries are completely orthogonal.
The EventFlow library uses the performance counter in the Microsoft.Diagnostics namespace as can be seen here. It does not provide any performance counters on its own.
The EventFlow library lets you capture the data for specific performance counters and output that data to one of the supported outputs. It is not designed to read the data directly, but to route it to another destination like application insights as stated at the introduction:
So, summarized: to directly read the values of the performance counters use the classes in the Microsoft.Diagnostics namespace. To log the values somewhere else use the EventFlow library.