Using SL Multiprofiler with DataDog on IIS (Windows)
This page will help you configure Sealights Multiprofiler Solution on IIS with a DataDog profiler.
Prerequisites
Install the Datadog Tracer for DotNet into a different folder than C:\Program Files\
, for example, “C:\DataDog-Tracer”
.
Open your Windows System Properties dialog, and in the Environment Variables section, remove the following ones if they have been set:
COR_PROFILER={846F5F1C-F9AE-4B07-969E-05C26BC060D8}
COR_PROFILER_PATH_64=C:\path\to\Datadog.Trace.ClrProfiler.Native.dll
COR_PROFILER_PATH_32=C:\path\to\Datadog.Trace.ClrProfiler.Native.dll
CORECLR_PROFILER={846F5F1C-F9AE-4B07-969E-05C26BC060D8}
CORECLR_PROFILER_PATH_64=C:\path\to\Datadog.Trace.ClrProfiler.Native.dll
CORECLR_PROFILER_PATH_32=C:\path\to\Datadog.Trace.ClrProfiler.Native.dll
Install the Sealights .Net Agent, for example, in C:\Sealights\dotnet-agent\
directory and place there your agent token as a sltoken.txt
file (Optional).
Installing the Datadog tracer for .NET in a folder other than C:\Program Files
is mandatory to avoid permission issues when IIS applications attempt to access that directory. This requirement ensures that Sealights’ Multiprofiler solution can properly load the Datadog profiler without restrictions. Please note that the Datadog agent itself may remain in its default location, as only the tracer must reside in a path freely accessible by IIS processes.
Setup
Set the environment variables for the IIS Services (WAS and W3SVC) to specify the parameters needed by the Sealights and DataDog agents.
CORECLR_ENABLE_PROFILING=1
CORECLR_PROFILER={9AAFB4C3-2E86-4C10-96D5-07E28F98554D}
CORECLR_PROFILER_PATH_64=C:\sealights\dotnet-agent\SL.DotNet.MultiProfilerLib.Windows_x64.dll
SL_EXT_PROFILER_1_NAME=Sealights
SL_EXT_PROFILER_1_PATH=C:\sealights\dotnet-agent\SL.DotNet.ProfilerLib.Windows_x64.dll
SL_EXT_PROFILER_1_GUID={01CA2C22-DC03-4FF5-8350-59E32A3536BA}
SL_EXT_PROFILER_2_NAME=DataDog
SL_EXT_PROFILER_2_PATH=C:\DataDog-Tracer\win-x64\Datadog.Trace.ClrProfiler.Native.dll
SL_EXT_PROFILER_2_GUID={846F5F1C-F9AE-4B07-969E-05C26BC060D8}
DD_PROFILING_ENABLED=1
SL_MP_LOGLEVEL=6
SL_MP_LogDir=C:\sealights\logs\multiprofiler
SL_AGENT_PORT=31031
SL_LOGGING_ENABLED=true
SL_Logging_toFile=true
SL_LOGGING_FileName=C:\sealights\logs\collector\listener_pic_iis
SL_EXE_PATH=C:\sealights\dotnet-agent\SL.DotNet.exe
SL_LogDir=C:\sealights\logs\
SL_LOGLEVEL=6
SL_SESSION_TOKENFILE=C:\sealights\dotnet-agent\sltoken.txt
SL_PROFILER_INITIALIZECOLLECTOR=1
SL_PROFILER_BLOCKING_CONNECTION_STARTUP=ASYNC
SL_SESSION_BUILDSESSIONIDFILE=C:\sealights\buildSessionId.txt
SL_LABID=integ_main_TestAppWeatherApi
If you're configuring the CD Agent, you'll need to add the following variables
SL_PROFILER_INITIALIZECOLLECTOR_MODE=cdAgent
SL_FEATURES_IDENTIFYMETHODSBYFQN=true
SL_GENERAL_APPNAME=TestAppWeatherApi
SL_GENERAL_BRANCHNAME=main
SL_GENERAL_BUILDNAME=PICCDAGENT-IIS-5
SL_SCAN_BINDIR=C:\inetpub\wwwroot\WeatherForecast\
SL_SCAN_INCLUDENAMESPACES_0=WeatherForecast.*
SL_SCAN_INCLUDEASSEMBLIES=*WeatherForecast
Open the registry keys and update both: Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WAS Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W3SVC by adding a new Multi-String value called Environment with the values defined above as their data
Completely stop and start IIS by running the following commands as an administrator:
net stop /y was
net start w3svc
Upon successful completion of this step, you should see the following new entries in Cockpit > Live Agent Monitor for the Sealights Profiler:
CollectorServiceSession
fordotnet
technologyProfiler
, displaying the version details of your application (with the connected Application Pool shown as a tag in the dedicated column)
The Multiprofiler will not appear in the Cockpit Live Agent Monitor because it is a local, offline tool, separate from the agent. The only way to confirm that it is working properly is to check its traces or logs, which you enable using the SL_MP_LogDir
and SL_MP_LOGLEVEL
environment variables.
For DataDog, you can follow your standard validation process. Typically, this involves reviewing the APM-dedicated tab in the DataDog Dashboard and ensuring no errors appear in the local DataDog profiler logs.
Last updated
Was this helpful?