Install - vFunction Monolithic and Datadog .NET Core Agents running on a Windows x86 Host
Overview
Microsoft .NET Applications have a limitation that only one Agent can be hooked into the Application at a time. To work around this limitation, the Datadog Profiler can be used as the Base Agent. This Datadog Profiler includes a configuration file that allows you to define additional .NET Agents to run simultaneously on the Application without conflict.
At a high level, you’ll need to:
- Download and install the vFunction Monolithic .NET Agent
- Modify the Datadog .NET Profiler to add the vFunction Monolithic .NET Agent as a Custom Profiler
- Restart the Application
.NET Core Compatibility
vFunction supports C# .NET Core version 3.x and .NET 6.x, 7.x and 8.x applications. Please see the full vFunction Compatibility Matrix.
Installation Steps
vFunction Monolithic Agent Installation
The steps below ensure that the vFunction Monolithic Agent’s configuration files are set for your environment. These steps alone do not hook the vFunction Monolithic Agent into the Application. You’ll also need to modify the DataDog Configuration to add the vFunction Monolithic Agent to hook the Application with the vFunction Monolithic Agent.
- Ensure vFunction Monolithic Agent Prerequisites are met
- Download the vFunction Windows Controller Installation ZIP for the vFunction Monolithic Agent
- RDP to the Windows Server as the user who runs the Application
- Move the vFunction Windows Controller Installation ZIP to the location on the Windows Server where the vFunction Agent should run
- Unzip the vFunction Installation Package to, for example, C:\vfunction
- Add the configuration settings for the vFunction Monolithic Agent either as Option A: User Environment Variables or as Option B: an installation.yaml
Option A: User Environment Variables
Take the following steps to add configuration settings via User Environment Variables:
- Log into the vFunction Server’s UI in a browser
- In the top-left corner, click the dropdown and select the relevant Application
- In the top-center menu bar, click the “Learning” tab
- On the left-side, click the “Select Controllers” link
- On the left-side, click the “Install Controller” link
- In the dialog box, find the YAML-formatted text box that contains the following details. You’ll need these details at a later stage below:
controller:
name: {display name for this controller}
host: $your_VF_Server_address
org_id: 93af7f38-0000-0000-0000-bd9516798497
app_id: 9fb228fc-0000-0000-0000-db8e83427e14
client_id: caeadcd1-0000-0000-0000-9c9b37a9e119
client_secret: 68cb85eb-0000-0000-0000-fb9e7f1d9240
- On the machine where the Application runs, open the Windows Start Menu and search for, “environment variables”
- Select the search results to edit the environment variables
- On the “System Properties” dialog box, make sure the “Advanced” tab is selected
- Select the “Environment Variables” button at the bottom of this page
- In the Environment Variables dialog box, find the top section for “User variables”
- Click the “New…” button and create the following Variables and Values
Note that the Variable Names below are accurate but the Values are not. Use the values for your environment retrieved from Step #6 above
| VF_CONTROLLER_DEFAULT_DOTNET_CONTROLLER_NAME | Create your own display name for this controller such as QA-Windows-1 |
| VF_CONTROLLER_DEFAULT_DOTNET_CONTROLLER_HOST | $your_VF_Server_address such as https://demo.vfunction.com |
| VF_CONTROLLER_DEFAULT_DOTNET_CONTROLLER_ORG_ID | 93af7f38-0000-0000-0000-bd9516798497 as an example |
| VF_CONTROLLER_DEFAULT_DOTNET_CONTROLLER_APP_ID | 9fb228fc-0000-0000-0000-db8e83427e14 as an example |
| VF_CONTROLLER_DEFAULT_DOTNET_CONTROLLER_CLIENT_ID | caeadcd1-0000-0000-0000-9c9b37a9e119 as an example |
| VF_CONTROLLER_DEFAULT_DOTNET_CONTROLLER_CLIENT_SECRET | 68cb85eb-0000-0000-0000-fb9e7f1d9240 as an example |
| VF_CONTROLLER_DEFAULT_DOTNET_CONTROLLER_INSTANCE_ID | Create your own display name for this controller such as QA-Windows-1 |
Option B: An Installation.yaml
Take the following steps to add configuration settings via an installation.yaml:
- Log into the vFunction Server’s UI in a browser
- In the top-left corner, click the dropdown and select the relevant Application
- In the top-center menu bar, click the “Learning” tab
- On the left-side, click the “Select Controllers” link
- On the left-side, click the “Install Controller” link
- In the dialog box, find the YAML-formatted text box that contains the following details. You’ll need these details at a later stage below:
controller:
name: {display name for this controller}
host: $your_VF_Server_address
org_id: 93af7f38-0000-0000-0000-bd9516798497
app_id: 9fb228fc-0000-0000-0000-db8e83427e14
client_id: caeadcd1-0000-0000-0000-9c9b37a9e119
client_secret: 68cb85eb-0000-0000-0000-fb9e7f1d9240
- On the machine where the Application runs, open the installation.yaml at the location relevant to where you unpacked the vFunction Controller Installation ZIP, such as C:\vfunction\config\installation\instances\default-dotnet\installation.yaml
### BEFORE
controller:
name:
host:
org_id:
app_id:
client_id:
client_secret:
type: dotnet
instrconf_additions:
inclusions:
# - a.b.c.
exclusions:
# - a.b.c.
tags:
# - tag1
### AFTER COPYING FROM STEP #6 ABOVE
controller:
name: Create your own display name for this controller such as QA-Windows-1
host: $your_VF_Server_address such as https://demo.vfunction.com
org_id: 93af7f38-0000-0000-0000-bd9516798497 as an example
app_id: 9fb228fc-0000-0000-0000-db8e83427e14 as an example
client_id: caeadcd1-0000-0000-0000-9c9b37a9e119 as an example
client_secret: 68cb85eb-0000-0000-0000-fb9e7f1d9240 as an example
type: dotnet
instrconf_additions:
inclusions:
# - a.b.c.
exclusions:
# - a.b.c.
tags:
# - tag1
- After following Option A or Option B to add the configuration settings for the vFunction Dynamic Agent, launch PowerShell as an Administrator and run the vFunction Monolithic Agent installation script
### Replace $BASE_DIR with the Windows location where the vFunction Installation ZIP was unzipped
dir -Path "$BASE_DIR" -Recurse | Unblock-File
powershell -NoProfile -ExecutionPolicy unrestricted -Command "$BASE_DIR\controller-installation\install.ps1 -instance default-dotnet"
- Add User Environment Variables for the vFunction Monolithic Agent
- On the machine where the Application runs, open the Windows Start Menu and search for, “environment variables”
- Select the search results to edit the environment variables
- On the “System Properties” dialog box, make sure the “Advanced” tab is selected
- Select the “Environment Variables” button at the bottom of this page
- In the Environment Variables dialog box, find the top section for “User variables”
- Click the “New…” button and create the following Variables and Values
| VF_AGENT_CONF_LOCATION | $BASE_DIR\config\agent\instances\default-dotnet\conf.json |
| DOTNET_TailCallOpt | 0 |
- The vFunction Monolithic Agent is installed (all configuration files are set) but is not hooked into the Application. Use the steps below to modify the DataDog configuration to add the vFunction Monolithic Agent to the Application.
Modify the DataDog configuration to add the vFunction Monolithic Agent
The steps below assume that:
- DataDog already exists on the Application
- The vFunction Monolithic Agent was installed
Take the following steps to modify the DataDog configuration to add the vFunction Monolithic Agent:
- Open the DataDog Profiler’s Configuration File. This is most likely located at C:\Program Files\Datadog.NET Tracer\win-x86\loader.conf
- Add the vFunction Monolithic Agent to the loader.conf. Note that the example below uses the BASE_DIR of C:\vfunction. This section of the path would need to be adjusted if the BASE_DIR is in another location:
################# BEFORE #################
#Profiler
PROFILER;{BD1A650D-AC5D-4896-B64F-D6FA25D6B26A};win-x64;.\Datadog.Profiler.Native.dll
PROFILER;{BD1A650D-AC5D-4896-B64F-D6FA25D6B26A};win-x86;.\Datadog.Profiler.Native.dll
PROFILER;{BD1A650D-AC5D-4896-B64F-D6FA25D6B26A};linux-x64;./Datadog.Profiler.Native.so
PROFILER;{BD1A650D-AC5D-4896-B64F-D6FA25D6B26A};linux-musl-x64;./Datadog.Profiler.Native.so
# PROFILER;{BD1A650D-AC5D-4896-B64F-D6FA25D6B26A};linux-arm64;./Datadog.Profiler.Native.so
# PROFILER;{BD1A650D-AC5D-4896-B64F-D6FA25D6B26A};linux-musl-arm64;./Datadog.Profiler.Native.so
#Tracer
TRACER;{50DA5EED-F1ED-B00B-1055-5AFE55A1ADE5};win-arm64;.\Datadog.Tracer.Native.dll
TRACER;{50DA5EED-F1ED-B00B-1055-5AFE55A1ADE5};win-x64;.\Datadog.Tracer.Native.dll
TRACER;{50DA5EED-F1ED-B00B-1055-5AFE55A1ADE5};win-x86;.\Datadog.Tracer.Native.dll
TRACER;{50DA5EED-F1ED-B00B-1055-5AFE55A1ADE5};linux-x64;./Datadog.Tracer.Native.so
TRACER;{50DA5EED-F1ED-B00B-1055-5AFE55A1ADE5};linux-musl-x64;./Datadog.Tracer.Native.so
TRACER;{50DA5EED-F1ED-B00B-1055-5AFE55A1ADE5};linux-arm64;./Datadog.Tracer.Native.so
TRACER;{50DA5EED-F1ED-B00B-1055-5AFE55A1ADE5};linux-musl-arm64;./Datadog.Tracer.Native.so
TRACER;{50DA5EED-F1ED-B00B-1055-5AFE55A1ADE5};osx-x64;./Datadog.Tracer.Native.dylib
TRACER;{50DA5EED-F1ED-B00B-1055-5AFE55A1ADE5};osx-arm64;./Datadog.Tracer.Native.dylib
################# AFTER #################
#Profiler
PROFILER;{BD1A650D-AC5D-4896-B64F-D6FA25D6B26A};win-x64;.\Datadog.Profiler.Native.dll
PROFILER;{BD1A650D-AC5D-4896-B64F-D6FA25D6B26A};win-x86;.\Datadog.Profiler.Native.dll
PROFILER;{BD1A650D-AC5D-4896-B64F-D6FA25D6B26A};linux-x64;./Datadog.Profiler.Native.so
PROFILER;{BD1A650D-AC5D-4896-B64F-D6FA25D6B26A};linux-musl-x64;./Datadog.Profiler.Native.so
# PROFILER;{BD1A650D-AC5D-4896-B64F-D6FA25D6B26A};linux-arm64;./Datadog.Profiler.Native.so
# PROFILER;{BD1A650D-AC5D-4896-B64F-D6FA25D6B26A};linux-musl-arm64;./Datadog.Profiler.Native.so
#Tracer
TRACER;{50DA5EED-F1ED-B00B-1055-5AFE55A1ADE5};win-arm64;.\Datadog.Tracer.Native.dll
TRACER;{50DA5EED-F1ED-B00B-1055-5AFE55A1ADE5};win-x64;.\Datadog.Tracer.Native.dll
TRACER;{50DA5EED-F1ED-B00B-1055-5AFE55A1ADE5};win-x86;.\Datadog.Tracer.Native.dll
TRACER;{50DA5EED-F1ED-B00B-1055-5AFE55A1ADE5};linux-x64;./Datadog.Tracer.Native.so
TRACER;{50DA5EED-F1ED-B00B-1055-5AFE55A1ADE5};linux-musl-x64;./Datadog.Tracer.Native.so
TRACER;{50DA5EED-F1ED-B00B-1055-5AFE55A1ADE5};linux-arm64;./Datadog.Tracer.Native.so
TRACER;{50DA5EED-F1ED-B00B-1055-5AFE55A1ADE5};linux-musl-arm64;./Datadog.Tracer.Native.so
TRACER;{50DA5EED-F1ED-B00B-1055-5AFE55A1ADE5};osx-x64;./Datadog.Tracer.Native.dylib
TRACER;{50DA5EED-F1ED-B00B-1055-5AFE55A1ADE5};osx-arm64;./Datadog.Tracer.Native.dylib
#Custom
CUSTOM;{cd7d4b53-96c8-4552-9c11-6e41df8eab8a};win-x64;C:\vfunction\agent\vfagent.net.x86.dll
- Restart the .NET Application
- Confirm the Application functions as expected
- Confirm that Datadog is captured informaton about the Application as expected
- Confirm that the vFunction Monolithic Agent is capturing data as expected by starting Learning and validating learning results