{"id":19054589,"url":"https://github.com/datadog/dd-trace-cpp","last_synced_at":"2026-03-27T02:41:33.420Z","repository":{"id":62463739,"uuid":"512828119","full_name":"DataDog/dd-trace-cpp","owner":"DataDog","description":"Datadog APM client for C++","archived":false,"fork":false,"pushed_at":"2026-03-26T16:19:18.000Z","size":10024,"stargazers_count":19,"open_issues_count":21,"forks_count":16,"subscribers_count":4,"default_branch":"main","last_synced_at":"2026-03-26T16:37:51.317Z","etag":null,"topics":["cpp","datadog","tracing"],"latest_commit_sha":null,"homepage":"https://www.datadoghq.com","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DataDog.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE-3rdparty.csv","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":"supported-configurations.json","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":"NOTICE","maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-07-11T16:17:43.000Z","updated_at":"2026-03-25T14:42:19.000Z","dependencies_parsed_at":"2024-03-01T15:28:01.211Z","dependency_job_id":"682fd8eb-f1e9-48d3-81d4-f37fcbeab965","html_url":"https://github.com/DataDog/dd-trace-cpp","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/DataDog/dd-trace-cpp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DataDog%2Fdd-trace-cpp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DataDog%2Fdd-trace-cpp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DataDog%2Fdd-trace-cpp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DataDog%2Fdd-trace-cpp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DataDog","download_url":"https://codeload.github.com/DataDog/dd-trace-cpp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DataDog%2Fdd-trace-cpp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31011420,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-27T02:33:22.146Z","status":"ssl_error","status_checked_at":"2026-03-27T02:33:21.763Z","response_time":164,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cpp","datadog","tracing"],"created_at":"2024-11-08T23:38:58.793Z","updated_at":"2026-03-27T02:41:33.402Z","avatar_url":"https://github.com/DataDog.png","language":"C++","readme":"Datadog C++ Tracing Library\n===========================\n\n```c++\n#include \u003cdatadog/span_config.h\u003e\n#include \u003cdatadog/tracer.h\u003e\n#include \u003cdatadog/tracer_config.h\u003e\n\n#include \u003cchrono\u003e\n#include \u003ciostream\u003e\n#include \u003cthread\u003e\n\nint main() {\n    namespace dd = datadog::tracing;\n\n    dd::TracerConfig config;\n    config.service = \"my-service\";\n\n    const auto validated_config = dd::finalize_config(config);\n    if (!validated_config) {\n        std::cerr \u003c\u003c validated_config.error() \u003c\u003c '\\n';\n        return 1;\n    }\n\n    dd::Tracer tracer{*validated_config};\n    dd::SpanConfig options;\n\n    options.name = \"parent\";\n    dd::Span parent = tracer.create_span(options);\n\n    std::this_thread::sleep_for(std::chrono::seconds(1));\n\n    options.name = \"child\";\n    dd::Span child = parent.create_child(options);\n    child.set_tag(\"foo\", \"bar\");\n\n    std::this_thread::sleep_for(std::chrono::seconds(2));\n}\n```\nSee the [examples](examples) directory for more extensive usage examples.\n\n## Platform Support\nThe library has been tested and is compatible on the following CPU architecture, OS and compiler combinations:\n- x86_64 and arm64 Linux with GCC 11.4.\n- x86_64 and arm64 Linux with Clang 14.\n- x86_64 Windows with MSVC 2022.\n- arm64 macOS with Apple Clang 15.\n\n\n## Building and Installation\n\n### Requirements\n`dd-trace-cpp` requires a [supported](#platform-support) C++17 compiler.\n\nA recent version of CMake is required (`3.28`), which might not be in your\nsystem's package manager. [bin/install-cmake](bin/install-cmake) is an installer\nfor a recent CMake, on Linux.\n\n### Building\nBuild this library from source using [CMake](https://cmake.org).\n\n```shell\ngit clone 'https://github.com/datadog/dd-trace-cpp'\ncd dd-trace-cpp\ncmake -B build .\ncmake --build build -j\n```\n\nBy default CMake will generate both static and shared libraries. To build only one of them use\neither `BUILD_SHARED_LIBS` or `BUILD_STATIC_LIBS`. Example:\n\n```shell\ncmake -B build -DBUILD_SHARED_LIBS=1 .\n```\n\n### Installation\nInstallation places a shared library and public headers into the appropriate system directories\n(`/usr/local/[…]`), or to a specified installation prefix. Example:\n\n```shell\n# Install dd-trace-cpp into `.install/` within the source repository.\ncmake --install build --prefix=.install\n```\n\n### Optional: Linking to the shared library\nIn case you decided to build the shared library:\n\nWhen building an executable that uses `dd-trace-cpp`, specify the path to\nthe installed headers using an appropriate `-I` option.  If the library was\ninstalled into the default system directories, then the `-I` option is not\nneeded.\n```shell\nc++ -I/path/to/dd-trace-cpp/.install/include -c -o my_app.o my_app.cpp\n```\n\nWhen linking an executable that uses `dd-trace-cpp`, specify linkage to the\nbuilt library using the `-ldd_trace_cpp` option and an appropriate `-L` option.\nIf the library was installed into the default system directories, then the `-L`\noptions is not needed. The `-ldd_trace_cpp` option is always needed.\n```shell\nc++ -o my_app my_app.o -L/path/to/dd-trace-cpp/.install/lib -ldd_trace_cpp\n```\n\nTest\n----\nPass `-DDD_TRACE_BUILD_TESTING=1` to `cmake` to include the unit tests in the build.\n\nThe resulting unit test executable is `test/tests` within the build directory.\n```shell\ncmake -B build -DDD_TRACE_BUILD_TESTING=1 .\ncmake --build build -j\n./build/test/tests\n```\n\nAlternatively, [bin/test](bin/test) is provided for convenience.\n\nContributing\n------------\nSee the [contributing guidelines](CONTRIBUTING.md) and the [maintainer docs](doc/maintainers.md)\nfor information on the overall structure of the repository.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatadog%2Fdd-trace-cpp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdatadog%2Fdd-trace-cpp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatadog%2Fdd-trace-cpp/lists"}