Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/datadog/dd-opentracing-cpp
Datadog Opentracing C++ Client
https://github.com/datadog/dd-opentracing-cpp
apm datadog opentracing tracing
Last synced: 2 months ago
JSON representation
Datadog Opentracing C++ Client
- Host: GitHub
- URL: https://github.com/datadog/dd-opentracing-cpp
- Owner: DataDog
- License: apache-2.0
- Created: 2018-04-05T21:12:56.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2024-04-29T18:01:23.000Z (8 months ago)
- Last Synced: 2024-04-30T16:13:52.020Z (8 months ago)
- Topics: apm, datadog, opentracing, tracing
- Language: C++
- Size: 2.68 MB
- Stars: 40
- Watchers: 546
- Forks: 39
- Open Issues: 34
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# Datadog OpenTracing C++ Client
[![CircleCI](https://circleci.com/gh/DataDog/dd-opentracing-cpp/tree/master.svg?style=svg)](https://app.circleci.com/pipelines/github/DataDog/dd-opentracing-cpp?branch=master)
> [!WARNING]
> Datadog OpenTracing for C++ is deprecated. Please use [dd-trace-cpp](https://github.com/DataDog/dd-trace-cpp/tree/main).## Usage
Usage docs are on the main Datadog website:
* [NGINX](https://docs.datadoghq.com/tracing/setup/nginx/)
* [Envoy](https://docs.datadoghq.com/tracing/setup/envoy/)
* [Istio](https://docs.datadoghq.com/tracing/setup/istio/)
* [C++ code](https://docs.datadoghq.com/tracing/setup/cpp/)For some quick-start examples, see the [examples](examples/) folder.
For detailed information about this library's configuration, see [configuration.md][2].
## Contributing
Before considering contributions to the project, please take a moment to read our brief [contribution guidelines](CONTRIBUTING.md).
## Build and Test (Linux and macOS)
### Dependencies
Building this project requires the following tools installed:
- Build tools (e.g. `build-essential`, xcode)
- `cmake` >= 3.1Additional libraries are installed via a script.
### Build Steps
- Clone the repository
```sh
git clone https://github.com/DataDog/dd-opentracing-cpp
```
- Install additional library dependencies (requires `sudo`)
```sh
cd dd-opentracing-cpp
sudo scripts/install_dependencies.sh
```
- Generate build files using `cmake`
```sh
mkdir .build
cd .build
cmake ..
```
- Run the build
```sh
make
```
- (Optional) Run the tests
```sh
cmake -DBUILD_TESTING=ON ..
make
ctest --output-on-failure
```
- (Optional) Install to `/usr/local`
```sh
make install
```If you want [sanitizers](https://github.com/google/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](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
```sh
cd %HOMEPATH%
git clone https://github.com/DataDog/dd-opentracing-cpp
```
- Generate build files using `cmake`
```bat
cd dd-opentracing-cpp
mkdir .build
cd .build
cmake -DCMAKE_TOOLCHAIN_FILE=%HOMEPATH%\vcpkg\scripts\buildsystems\vcpkg.cmake ..
```
- Run the build
```bat
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][1].### Integration tests
Integration tests require additional tools installed:
- [msgpack-cli](https://github.com/jakm/msgpack-cli)
- [wiremock](https://github.com/tomakehurst/wiremock)
- `jq`Installation details can be extracted from the [Dockerfile](https://github.com/DataDog/docker-library/blob/master/dd-opentracing-cpp/test/0.3.1/Dockerfile#L7-L14) for the container that is usually used when running integration tests.
Run this command to run the integration tests directly.
```sh
test/integration/run_integration_tests_local.sh
```[1]: https://github.com/DataDog/dd-opentracing-cpp/issues/170
[2]: doc/configuration.md