Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit

The CMake version required to build dd-opentracing-cpp was increased
recently, but the examples/ were not updated to use a version of
Ubuntu that had the required version.

This commit updates the Docker base images used in the examples,
as well as tweaks the examples to build faster and a couple of other

Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Datadog OpenTracing C++ Client



Usage docs are on the main Datadog website:

For some quick-start examples, see the examples folder.

For detailed information about this library's configuration, see


Before considering contributions to the project, please take a moment to read our brief contribution guidelines.

Build and Test (Linux and macOS)


Building this project requires the following tools installed:

  • Build tools (e.g. build-essential, xcode)
  • cmake >= 3.1

Additional libraries are installed via a script.

Build Steps

  • Clone the repository
    git clone
  • Install additional library dependencies (requires sudo)
    cd dd-opentracing-cpp
    sudo scripts/
  • Generate build files using cmake
    mkdir .build
    cd .build
    cmake ..
  • Run the build
  • (Optional) Run the tests
    cmake -DBUILD_TESTING=ON ..
    ctest --output-on-failure
  • (Optional) Install to /usr/local
    make install

If you want sanitizers to be enabled, then add either the -DSANITIZE_THREAD=ON -DSANITIZE_UNDEFINED=ON or -DSANITIZE_ADDRESS=ON flags to cmake, running the tests will now also check with the sanitizers.

You can enable code coverage instrumentation in the builds of the library and its unit tests by adding the -DBUILD_COVERAGE=ON flag to cmake. See scripts/

Build (Windows)

NOTE: This is currently Early Access, and issues should be reported only via GitHub Issues. Installation steps are likely to change based on user feedback and becoming available via Vcpkg.


Building this project requires the following tools installed:

  • Visual Studio 2019 with "Desktop development for C++" installed
  • Vcpkg
  • Git

Build Steps

The commands below should be executed in an x64 Native Tools Command Prompt shell.

  • Clone the repository
    cd %HOMEPATH%
    git clone
  • Generate build files using cmake
    cd dd-opentracing-cpp
    mkdir .build
    cd .build
    cmake -DCMAKE_TOOLCHAIN_FILE=%HOMEPATH%\vcpkg\scripts\buildsystems\vcpkg.cmake ..
  • Run the build
    cmake --build . -- -p:Configuration=RelWithDebInfo

Take care to update the Configuration value (e.g. to Debug) if you change the build mode in your IDE. See this related issue.

Integration tests

Integration tests require additional tools installed:

Installation details can be extracted from the Dockerfile for the container that is usually used when running integration tests.

Run this command to run the integration tests directly.