Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
64fd764
add micro-benchmarks for TraceID hex formatting and parsing (#311)
AneesPatel May 26, 2026
ed07610
build(deps): bump the gh-actions-packages group with 2 updates (#323)
dependabot[bot] Jun 3, 2026
e18ada4
Get dd_trace_agent_url from Tracer configuration for meaningful Syste…
xlamorlette-datadog Jun 8, 2026
9bce164
fix(telemetry): refactor to shared_ptr and add deterministic shutdown…
cataphract Jun 9, 2026
77da245
Use GitHub action instead of npm package for code coverage upload (#327)
xlamorlette-datadog Jun 11, 2026
22ce7de
Capture proxy related environment variables at Curl client constructi…
xlamorlette-datadog Jun 16, 2026
d38a9d8
Bump version following delivery of v2.1.1 (#329)
xlamorlette-datadog Jun 19, 2026
227add0
Reformat documentation. Cleaned deprecated typographic rules. (#331)
xlamorlette-datadog Jul 2, 2026
6979721
Redo diagrams with Mermaid (#334)
xlamorlette-datadog Jul 3, 2026
c6d0708
Reorganize the documentation (#335)
xlamorlette-datadog Jul 3, 2026
e128a5b
Create Conventions & Rationale documentation from the Decisions one (…
xlamorlette-datadog Jul 6, 2026
cfeb952
Huge update of the Design documentation (#338)
xlamorlette-datadog Jul 13, 2026
f54ab38
Create class diagram in the Design documentation (#339)
xlamorlette-datadog Jul 16, 2026
ddb288c
feat(tracing): add span link support (#330)
MilanGarnier Jul 22, 2026
47b911d
feat(tracing): add support for DD_TRACE_PROPAGATION_BEHAVIOR_EXTRACT …
MilanGarnier Jul 22, 2026
4b2d216
Fix shared library link flag in README (-ldd_trace_cpp -> -ldd-trace-…
spottsdd Jul 30, 2026
551226d
ci: skip Datadog uploads without an API key (#346)
bm1549 Jul 30, 2026
0825deb
build(deps): bump the gh-actions-packages group with 4 updates (#333)
dependabot[bot] Jul 31, 2026
b8001d7
build(deps): update Bazel dependencies and pin Bazel 9.1.1 (#332)
dependabot[bot] Jul 31, 2026
fa2e9ef
build(deps): bump the gh-actions-packages group with 3 updates (#348)
dependabot[bot] Aug 3, 2026
5cd9565
build(deps): bump the bazel-packages group with 2 updates (#347)
dependabot[bot] Aug 3, 2026
5d97eaa
Fix cmake install missing http_endpoint_calculation_mode.h (#345)
spottsdd Aug 3, 2026
a835232
Place _dd.apm.enabled:0 in every span (#343)
cataphract Aug 5, 2026
84ec379
Add 'Clean Code' and 'C++ Code Style' sections to the 'Conventions' d…
xlamorlette-datadog Aug 7, 2026
6cbe22e
Import process context reference implementation
ivoanjo Jun 4, 2026
dd95413
feat: [PROF-14789] Publish OTel process context
ivoanjo Jun 4, 2026
fb1e9a7
Make autoformatter happy
ivoanjo Jun 5, 2026
c8261da
Tweak to make CI happy
ivoanjo Jun 5, 2026
74754ca
Another try at making CI happy
ivoanjo Jun 5, 2026
ac6e7c0
More small tweaks to make CI happy
ivoanjo Jun 5, 2026
e19da4b
More CI fixes
ivoanjo Jun 5, 2026
a7e4d45
More making CI happy
ivoanjo Jun 5, 2026
09df310
Add links to where `otel_process_ctx.h/.cpp
ivoanjo Jun 8, 2026
76a27ca
Introduce new constant with library name, rather than hardcoding in r…
ivoanjo Jun 18, 2026
36f61ae
Minor: Remove redundant includes
ivoanjo Jun 18, 2026
a61a41b
Minor: Use references when building up metadata
ivoanjo Jun 18, 2026
1352256
Minor: Don't compare unordered maps as it can easily break
ivoanjo Jun 18, 2026
93ead45
Tweak behavior when report_hostname is disabled + add test
ivoanjo Jun 19, 2026
d8cf026
Add missing `static` declaration
ivoanjo Jun 19, 2026
fde363c
Minor: Fix wording in comment to use infinitive
ivoanjo Jun 19, 2026
822d065
Introduce move-only RAII guard and mutex to ensure correctness
ivoanjo Jun 19, 2026
3ff726b
Tighten tests for moving the tracer instance
ivoanjo Jun 19, 2026
3354473
Merge branch 'main' into ivoanjo/prof-14789-otel-process-ctx
ivoanjo Jun 22, 2026
6ece3ea
Merge remote-tracking branch 'origin/main' into ivoanjo/prof-14789-ot…
ivoanjo Jul 21, 2026
3a55881
Avoid using auto to improve readibility
ivoanjo Jul 21, 2026
7a80339
Use compound namespaces
ivoanjo Jul 21, 2026
c91a28a
Improve naming
ivoanjo Jul 21, 2026
dea073f
More naming improvements
ivoanjo Jul 21, 2026
0da9027
More naming improvements
ivoanjo Jul 21, 2026
b66a2ad
Make test code stricter
ivoanjo Jul 21, 2026
1dfe8ff
Add test for existing memfd datadog-tracer-info publishing logic
ivoanjo Jul 22, 2026
1dc4c30
Streamline `store_config` logic
ivoanjo Jul 22, 2026
df911d5
Improve handling for many multiple tracer instances
ivoanjo Jul 29, 2026
d9b66ed
Add entry for vendored otel_process_ctx library
ivoanjo Jul 29, 2026
abfd29d
Assert on expected error, not just on error count
ivoanjo Jul 29, 2026
3f65913
Support multiple tracers with the same runtime id
ivoanjo Jul 29, 2026
b76b9c9
Make linter happy
ivoanjo Jul 29, 2026
52c9606
Merge branch 'main' into ivoanjo/prof-14789-otel-process-ctx
ivoanjo Jul 29, 2026
e40b70b
Minor: Remove redundant include (already pulled indirectly)
ivoanjo Aug 10, 2026
add3c88
Minor: Rename `StaticOtelContextState` -> `StaticOtelCtxState`
ivoanjo Aug 10, 2026
73d3ec7
Release `StaticOtelContextState` mutex before logging
ivoanjo Aug 10, 2026
613d4dd
Merge branch 'main' into ivoanjo/prof-14789-otel-process-ctx
ivoanjo Aug 10, 2026
1418213
Merge remote-tracking branch 'origin/main' into ivoanjo/prof-14789-ot…
ivoanjo Aug 10, 2026
fe98617
Minor: Fix duplicate test from merge conflict handling
ivoanjo Aug 10, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ cc_library(
"src/datadog/msgpack.cpp",
"src/datadog/msgpack.h",
"src/datadog/null_logger.h",
"src/datadog/otel_process_ctx.cpp",
"src/datadog/otel_process_ctx.h",
"src/datadog/otel_process_ctx_registration.cpp",
"src/datadog/otel_process_ctx_registration.h",
"src/datadog/parse_util.cpp",
"src/datadog/parse_util.h",
"src/datadog/platform_util.h",
Expand Down
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,8 @@ target_sources(dd-trace-cpp-objects
src/datadog/limiter.cpp
src/datadog/logger.cpp
src/datadog/msgpack.cpp
src/datadog/otel_process_ctx.cpp
src/datadog/otel_process_ctx_registration.cpp
src/datadog/parse_util.cpp
src/datadog/propagation_behavior_extract.cpp
src/datadog/propagation_style.cpp
Expand Down
3 changes: 2 additions & 1 deletion LICENSE-3rdparty.csv
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ Component,Origin,License,Copyright
vendored,nlohmann/json,MIT,Copyright (c) 2013-2022 Niels Lohmann <http://nlohmann.me>
vendored,Catch2,Boost,Copyright (c) 2022 Two Blue Cubes Ltd. All rights reserved.
vendored,picosha2,MIT,Copyright (C) 2017 okdshin
vendored,cpp-httplib,MIT,Copyright (c) 2023 Yuji Hirose. All rights reserved.
vendored,cpp-httplib,MIT,Copyright (c) 2023 Yuji Hirose. All rights reserved.
vendored,open-telemetry/sig-profiling (process-context),Apache-2.0,"Copyright 2025 Datadog, Inc."
19 changes: 19 additions & 0 deletions cmake/deps/msgpack.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
include(FetchContent)

# Header-only; used only by the test suite to decode msgpack payloads written
# by the library, so we don't need Boost, its own tests, examples, or docs.
set(MSGPACK_USE_BOOST OFF CACHE BOOL "" FORCE)
set(MSGPACK_CXX17 ON CACHE BOOL "" FORCE)
set(MSGPACK_BUILD_TESTS OFF CACHE BOOL "" FORCE)
set(MSGPACK_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
set(MSGPACK_BUILD_DOCS OFF CACHE BOOL "" FORCE)

FetchContent_Declare(msgpack-cxx
URL https://github.com/msgpack/msgpack-c/archive/refs/tags/cpp-8.0.0.tar.gz
URL_HASH SHA256=f634fb7052da4478096f2a02dfb6d91174e5836b317afb006375249ccb086aa8
FIND_PACKAGE_ARGS NAMES msgpack-cxx
EXCLUDE_FROM_ALL
SYSTEM
)

FetchContent_MakeAvailable(msgpack-cxx)
11 changes: 11 additions & 0 deletions include/datadog/tracer.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ class TraceSampler;
class SpanSampler;
class IDGenerator;
class InMemoryFile;
class OtelCtxRegistration;

class Tracer {
std::shared_ptr<Logger> logger_;
Expand All @@ -53,6 +54,7 @@ class Tracer {
// read to determine if the process is instrumented with a tracer and to
// retrieve relevant tracing information.
std::shared_ptr<InMemoryFile> metadata_file_;
std::unique_ptr<OtelCtxRegistration> otel_context_registration_;
Baggage::Options baggage_opts_;
bool baggage_injection_enabled_;
bool baggage_extraction_enabled_;
Expand All @@ -67,6 +69,15 @@ class Tracer {
Tracer(const FinalizedTracerConfig& config,
const std::shared_ptr<const IDGenerator>& generator);

~Tracer();
Comment thread
xlamorlette-datadog marked this conversation as resolved.

// Move-only. OtelCtxRegistration is a per-tracer-instance handle; duplicating
// ownership would break that invariant, thus copies are disallowed.
Tracer(Tracer&&) noexcept;
Tracer& operator=(Tracer&&) noexcept;
Tracer(const Tracer&) = delete;
Tracer& operator=(const Tracer&) = delete;

// Create a new trace and return the root span of the trace. Optionally
// specify a `config` indicating the attributes of the root span.
Span create_span();
Expand Down
3 changes: 3 additions & 0 deletions include/datadog/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

namespace datadog::tracing {

// This library's name
extern const char *const tracer_library_name;

// The release version at or before this code revision, e.g. "v0.1.12".
// That is, this code is at least as recent as `tracer_version`, but may be
// more recent.
Expand Down
5 changes: 3 additions & 2 deletions src/datadog/error.cpp
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
#include <datadog/error.h>
#include <datadog/version.h>

#include <ostream>

namespace datadog {
namespace tracing {

std::ostream& operator<<(std::ostream& stream, const Error& error) {
return stream << "[dd-trace-cpp error code " << int(error.code) << "] "
<< error.message;
return stream << "[" << tracer_library_name << " error code "
<< int(error.code) << "] " << error.message;
}

Error Error::with_prefix(StringView prefix) const {
Expand Down
Loading
Loading