项目作者: DataDog

项目描述 :
Datadog Opentracing C++ Client
高级语言: C++
项目地址: git://github.com/DataDog/dd-opentracing-cpp.git
创建时间: 2018-04-05T21:12:56Z
项目社区:https://github.com/DataDog/dd-opentracing-cpp

开源协议:Other

下载


Datadog OpenTracing C++ Client

CircleCI

[!WARNING]
Datadog OpenTracing for C++ is deprecated. Please use dd-trace-cpp.

Usage

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 configuration.md.

Contributing

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

Build and Test (Linux and macOS)

Dependencies

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
    1. git clone https://github.com/DataDog/dd-opentracing-cpp
  • Install additional library dependencies (requires sudo)
    1. cd dd-opentracing-cpp
    2. sudo scripts/install_dependencies.sh
  • Generate build files using cmake
    1. mkdir .build
    2. cd .build
    3. cmake ..
  • Run the build
    1. make
  • (Optional) Run the tests
    1. cmake -DBUILD_TESTING=ON ..
    2. make
    3. ctest --output-on-failure
  • (Optional) Install to /usr/local
    1. 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/run_coverage.sh.

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.

Dependencies

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
    1. cd %HOMEPATH%
    2. git clone https://github.com/DataDog/dd-opentracing-cpp
  • Generate build files using cmake
    1. cd dd-opentracing-cpp
    2. mkdir .build
    3. cd .build
    4. cmake -DCMAKE_TOOLCHAIN_FILE=%HOMEPATH%\vcpkg\scripts\buildsystems\vcpkg.cmake ..
  • Run the build
    1. 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.

  1. test/integration/run_integration_tests_local.sh