Skip to content

withlin/dd-trace-csharp

 
 

Repository files navigation

.NET Tracer for Datadog APM

NOTE: The .NET Tracer is currently in Public Beta.

Environment Build Status
Windows Build status
Linux Build status

Installation and Usage

Please read our documentation for instructions on setting up .NET tracing and details about supported frameworks.

Development

The Components

Datadog Trace Agent: A service that runs on your application servers, accepting trace data from the Datadog Tracer and sending it to Datadog. The Trace Agent is not part of this repo; it's the same Trace Agent to which all Datadog tracers (e.g. Go, Python, Java, Ruby) send data.

Datadog .NET Tracer: This repository. A set of .NET libraries that let you trace any piece of your .NET code. Supports manual instrumentation and can automatically instrument supported libraries out-of-the-box.

Windows

Minimum requirements to build the code in this repository:

  • Visual Studio 2017 v15.7 or newer
    • Workloads
      • Desktop development with C++
      • .NET desktop development
      • .NET Core cross-platform development
      • Optional: ASP.NET and web development (to build samples )
    • Individual components
      • .NET Framework 4.7 targeting pack
  • .NET Core 2.0 SDK or newer
  • Optional: WiX Toolset 3.11.1 or newer to build Windows installer (msi)
    • Requires .NET Framework 3.5 SP2 (install from Windows Features control panel: OptionalFeatures.exe)
    • WiX Toolset VS2017 Extension to build installer from VS2017
  • Optional: Docker for Windows to run some integration tests
    • Requires Windows 10 (1607 Anniversary Update, Build 14393 or newer)

Microsoft provides evaluation developer VMs with Windows 10 with Visual Studio 2017 pre-installed.

Linux

Only manual instrumentation is supported on Linux at this time. Projects Datadog.Trace, Datadog.Trace.OpenTracing, and their respective test projects can be built on Linux when targeting .NET Core.

Requirements:

Due to this issue in the .NET Core SDK, to build projects that target the .NET Framework and of , you'll need this workaround.

CoreCLR submodule

This project makes use of git submodules to include required CoreCLR C++ headers. To build the C++ project, clone this repository with the --recurse-submodules option or run the following commands after cloning this repository:

git submodule init
git submodule update

Running tests

The tests require the dependencies specified in docker-compose.yaml to be running on the same machine. For this you need to have docker installed on your machine, and to start the dependencies with ./build.sh --target=dockerup.

To build and run the tests on Windows:

./build.ps1

Or on Unix systems:

./build.sh

Further Reading

Datadog APM

Microsoft .NET Profiling APIs

OpenTracing

Get in touch

If you have questions, feedback, or feature requests, reach our support.

Packages

No packages published

Languages

  • C++ 72.4%
  • C 21.4%
  • C# 5.3%
  • Assembly 0.3%
  • Perl 0.2%
  • PowerShell 0.2%
  • Other 0.2%