Summary

High thread counts are reported when instrumenting .NET applications resulting in high CPU usage. The high thread count is a result of third-party logging framework which these agents use.

Affected Software

Any Windows based .NET application instrumented using a NuGet package or Azure Site Extension.

 Workaround 

Turn off Profiler logging. This will not affect visibility.

To turn off the Profiler logging:

  1. Locate the AppDynamicsAgentLog.config file.
    • For Azure Site Extension installs, it’s located in:

      D:\home\SiteExtensions\AppDynamics.WindowsAzure.SiteExtension.4.X.Release\AppDynamics\
    • For NuGet installs, it’s located in the same folder as your Agent DLLs.
  2. Remove the following lines:
    • <target name="Profiler" xsi:type="File" archiveAboveSize="12000000" maxArchiveFiles="2" createDirs="true" fileName="${environment:variable=HOME}\LogFiles\AppDynamics\Profiler" layout="${longdate} ${processid} ${appdomainid} ${threadid} ${level} ${logger:shortName=True} ${message}" />

    • <logger name="com.appdynamics.profiler.*" minlevel="Info" writeTo="Profiler" />
  3. Restart instrumented applications.