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).

Setup

  1. Set the environment variables for the IIS Services (WAS and W3SVC) to specify the parameters needed by the Sealights and DataDog agents.

In the given sample configuration example below:

  • Change the “SL_” settings depending on your Sealights configuration use case

  • The Datadog Tracer is installed in the folder “C:\DataDog-Tracer” instead of “C:\Program Files” (as explained in the prerequisites)

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
  1. 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

  2. Completely stop and start IIS by running the following commands as an administrator:

net stop /y was 
net start w3svc

Last updated

Was this helpful?