Auto-instrumentation assets for Datadog APM
$ dotnet add package Datadog.Trace.BundleDatadog.Trace.Bundle NuGet packageThis package contains the full Datadog .NET APM suite for Tracing (automatic, and custom), Continuous Profiler and Application Security Monitoring (ASM).
Do not install this package if any of the following are true:
Install this package if:
If you are using automatic instrumentation and would like to interact with APM only through C# attributes, see the Datadog.Trace.Annotations NuGet package.
Datadog.Trace.Bundle contains two things:
These native binaries are identical to those installed by the MSI and Linux installer packages, so Datadog.Trace.Bundle should be considered an alternative deployment mechanism for automatic instrumentation.
The main advantages of Datadog.Trace.Bundle over the MSI or Linux packages are:
dotnet add package Datadog.Trace.Bundle, for example.After adding the NuGet package to your project, set the following required environment variables to enable automatic instrumentation of your application and restart the application.
NOTE: The following are the mandatory variables. For further configuration options, see our public documentation for the Tracer and the Continuous Profiler.
.NET Core:
CORECLR_ENABLE_PROFILING=1
CORECLR_PROFILER={846F5F1C-F9AE-4B07-969E-05C26BC060D8}
CORECLR_PROFILER_PATH=<System-dependent path>
DD_DOTNET_TRACER_HOME=<APP_DIRECTORY>/datadog
.NET Framework:
COR_ENABLE_PROFILING=1
COR_PROFILER={846F5F1C-F9AE-4B07-969E-05C26BC060D8}
COR_PROFILER_PATH=<System-dependent path>
DD_DOTNET_TRACER_HOME=<APP_DIRECTORY>/datadog
The value for the <APP_DIRECTORY> placeholder is the path to the directory containing the application’s .dll files. The value for the CORECLR_PROFILER_PATH/COR_PROFILER_PATH environment variable varies based on the system where the application is running:
| OPERATING SYSTEM AND PROCESS ARCHITECTURE | CORECLR_PROFILER_PATH VALUE |
|---|---|
| Alpine Linux x64 | <APP_DIRECTORY>/datadog/linux-musl-x64/Datadog.Trace.ClrProfiler.Native.so |
| Linux x64 | <APP_DIRECTORY>/datadog/linux-x64/Datadog.Trace.ClrProfiler.Native.so |
| Alpine Linux ARM64 | <APP_DIRECTORY>/datadog/linux-musl-arm64/Datadog.Trace.ClrProfiler.Native.so |
| Linux ARM64 | <APP_DIRECTORY>/datadog/linux-arm64/Datadog.Trace.ClrProfiler.Native.so |
| Windows x64 | <APP_DIRECTORY>\datadog\win-x64\Datadog.Trace.ClrProfiler.Native.dll |
| Windows x86 | <APP_DIRECTORY>\datadog\win-x86\Datadog.Trace.ClrProfiler.Native.dll |
For Docker images running on Linux, configure the image to run the createLogPath.sh script:
RUN /<APP_DIRECTORY>/datadog/createLogPath.sh
Docker examples are available here
If you have questions, feedback, or feature requests, reach our support.