When the line executes that tries to start a transaction I get this error:
[2019-09-20 05:02:42][Error] - {SystemTotalCpuProvider} Failed instantiating PerformanceCounter - please make sure the current user has permissions to read performance counters. E.g. make sure the current user is member of the 'Performance Monitor Users' group
Exception: System.InvalidOperationException, Message: Category does not exist.
Which is clearly a reference to the CPU usage metric gathering. I read online that this is a issue with administrative privileges, however when I run VS in admin mode, I still get this error.
It seems we have a bug in .NET Agent and I opened an issue to investigate - https://github.com/elastic/apm-agent-dotnet/issues/501. Unfortunately it's quite possible that the log message is misleading and mistakenly assumes that the root cause is missing permissions. So far we saw that in the case where root cause was a permission problem the exception was UnauthorizedAccessException and not InvalidOperationException but we cannot rule out a permissions problem for sure until we find the root case.
Which bring me to the main problem - PerformanceCounter failure. We would like to reproduce it in our environment in order to investigate. Could you please provide more details about your environment:
What is the OS (desktop/server Windows) and its version?
What is the .NET runtime (.NET Framework or .NET Core) and its version?
Thank you @LordMathis
The issue is still not reproducible in our environment. Could you please run the following commands (from the command line with admin permissions) and post the results:
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.