This documents the steps necessary to configure SeaLights to run alongside any other profilers currently configured in your environment.
This is done by utilizing the Microsoft CLR Instrumentation profiler, designed to allow hosting multiple profilers simultaneously.
Table of Contents
Configuring the Microsoft CLR Instrumentation Engine to run multiple profilers
...
- 3rd party profiler is configured and supports Microsoft CLR Instrumentation technology. This can be verified by confirming the existence of the MicrosoftInstrumentationEngine_x64.dll in your system.
- SeaLights environment variables are configured for the process or service from which coverage should be collected (see box at end of this page for a list)
- Identify the 3rd party provider's Profiler ID and DLL location
...
- Ensure the following environment variables are aligned:
- COR_PROFILER={324F817A-7420-4E6D-B3C1-143FBED6D855}
- COR_PROFILER_PATH_64=C:\<path to where the file is>\MicrosoftInstrumentationEngine_x64.dll
Prepare an XML file to be used to link the two profilers, to be referenced in the next step:
Code Block title MSCLR XML Configuration <InstrumentationEngineConfiguration> <InstrumentationMethod> <Name>VS Profiler</Name> <Description>Visual Studio Profiler</Description> <Module>VSPerfCorProf.dll</Module> <ClassGuid>{33708259-ba1b-4add-9de4-d4f280ea1223}</ClassGuid> <Priority>60</Priority> </InstrumentationMethod> <InstrumentationMethod> <Name>SL Profiler</Name> <Description>Sealights .NET profiler</Description> <Module>SL.DotNet.ProfilerLib_x64.dll</Module> <ClassGuid>{01CA2C22-DC03-4FF5-8350-59E32A3536BA}</ClassGuid> <Priority>50</Priority> </InstrumentationMethod> </InstrumentationEngineConfiguration>
Define 2 additional environment variables:
- MicrosoftInstrumentationEngine_ConfigPath64_=C:\<Path to MSCLR XML Configuration file.xml>
- MicrosoftInstrumentationEngine_DisableCodeSignatureValidation=1
- When the service is restarted, it will be running SeaLights along with the 3rd party profiler, which will both run under the Microsoft CLR Instrumentation Engine.
...
- In the Contrast agent configuration YAML, the enable_chaining property must be set to 'true'. Refer to Contrast Security .NET Agent documentation for more information.
- Copy the following DLLs from the provided SeaLights installation to the folders specified below:
SL.DotNet.IpcLibrary-1.0.0.0_x64.DLL should be placed in c:\Windows\System32
SL.DotNet.IpcLibrary-1.0.0.0_x86.DLL should be placed in c:\Windows\SysWow64
- Ensure the COR_PROFILER environment variable has the SeaLights profiler CLS ID: {01CA2C22-DC03-4FF5-8350-59E32A3536BA}
- Once the above is completed and the service is restarted, it should start up with both profilers active.
- If the profilers were chained successfully, 4 additional environment variables will appear with the CONTRAST_CCC prefix:
- CONTRAST_CCC_COR_PROFILER
- CONTRAST_CCC_COR_PROFILER_PATH
- CONTRAST_CCC_COR_PROFILER_PATH_32
- CONTRAST_CCC_COR_PROFILER_PATH_64
...
Page Properties | ||
---|---|---|
| ||
|