feat(tracing): add span link support#330
Conversation
|
BenchmarksBenchmark execution time: 2026-07-07 13:58:45 Comparing candidate commit a1a3484 in PR branch Found 1 performance improvements and 3 performance regressions! Performance is the same for 4 metrics, 0 unstable metrics.
|
cbb3ed8 to
86d189e
Compare
003399b to
28432fe
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6c2f121762
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
8492993 to
5c93eca
Compare
xlamorlette-datadog
left a comment
There was a problem hiding this comment.
This is only a first very light and superficial review, I should review in detail in a few days.
Description
Adds OpenTelemetry-style span links to dd-trace-cpp.
ExtractedContext struct(include/datadog/extracted_context.h)SpanLinkstruct (include/datadog/span_link.h): 128-bittrace_id,span_id, optionaltracestate, stringattributes, optionalflags.src/datadog/span_link.cpp): per-link map with the exact field names and omission rules used by dd-trace-go / dd-trace-py / dd-trace-rs (trace_id,trace_id_highonly when non-zero,span_id,attributesonly when non-empty,tracestateonly when non-empty,flagswith high bit set when present).SpanData::span_links(src/datadog/span_data.h/.cpp):std::vector<SpanLink>field; the span encoder emits aspan_linksarray only when non-empty (matchesomitemptybehaviour of other tracers).Span::add_link(const SpanLink&)(include/datadog/span.h,src/datadog/span.cpp): public API to attach a link to a live span.POST /trace/span/add_link(test/system-tests/): wires up the cross-language system-test client contract.Motivation
This feature is supported by all other tracers and is a dependency for future implementations, such as
DD_TRACE_PROPAGATION_BEHAVIOR_EXTRACTconfig (planned).Additional Notes
test/test_span_link.cppandtest/test_span.cppexercise serialization and the public API end-to-end.Jira ticket: APMAPI-1941