Closed ysj2018 closed 1 week ago
@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.
Thank you for your answer. On Windows 10, I can get results by using a script to add environment variables. However, I have tried adding system variables before, but they didn't take effect. So, for previous versions of Windows, is it currently not supported to add a variable for each application?
The script should work on IIS10 on all versions of Windows. It sets the environment variables on the AppPool, not system environment variables.
@ysj2018 I will close this issue and switch the conversation to your discuss post. There isn't a bug to address here, and questions are best kept on the forum.
I would like to use Elastic APM's profiler auto-instrumentation to monitor our .NET application. I first tested it on Windows 10, but the profiling was unsuccessful. I followed the steps described on the official website:
web.config
file to add environment variables with the following configuration:web.config
and directly configured the variables as system variables, then restarted the application, but still did not see the profiler being loaded.What could be the possible reasons? Are there any issues with my operations?