As per my response in the GitHub issue:
@ysj2018, Have you viewed the profiler documentation? We provide a script to configure the environment variables against the app pool. Using web.config
is untested for ASP.NET Core.
You have used the incorrect environment variables for your app. For ASP.NET Core (.NET 5+) you should be using:
CORECLR_ENABLE_PROFILING = "1"
CORECLR_PROFILER = "{FA65FE15-F085-4681-9B20-95E04F6C03CC}"
CORECLR_PROFILER_PATH = "$profilerHomeDir\elastic_apm_profiler.dll"
COR_PROFILER
etc. is for .NET Framework.
Please try using the documented scripting approach to enable profiling, and let us know if you have any issues after that.