typically environment variables are used. see docs:
How to manually remove 3rd Party profiler from .Net

After uninstalling a 3rd Party profiler for a IIS 10 / ASP.Net deployment, the profiler assemblies were still on disk connecting to my app pools. I finally deleted all files and removed all registry entries to purge the system, which worked. Now in the Application Event Log I see this:
.NET Runtime version 4.0.30319.0 - Loading profiler failed during CoCreateInstance. Profiler CLSID: '{e2338988-38cc-48cd-a6b6-b441c31f34f1}'. HRESULT: 0x8007007e. Process ID (decimal): 6504. Message ID: [0x2504].
I deleted all references to that GUID, it doesn't exist anywhere in the registry. Where do profilers register with .NET?
Thanks