Repository navigation
feat(otel): otel sampling support in distributed tracing - #4177
Conversation
🎉 All green!🧪 All tests passed 🎯 Code Coverage (details) 🔗 Commit SHA: 927f2b8 | Docs | View more details | Give us feedback! |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f7329a3d7e
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Snapshots difference summaryThe following differences have been observed in committed snapshots. It is meant to help the reviewer. If you need to update snapshots, please refer to CONTRIBUTING.md 2 occurrences of : - "_dd.span_links": "[{\"trace_id\":\"0000000000000000c151df7d6ee5e2d6\",\"span_id\":\"c151df7d6ee5e2d6\",\"trace_state\":\"dd=t.dm:-0\",\"attributes\":{\"_dd.p.dm\":\"-0\"}}]"
+ "_dd.span_links": "[{\"trace_id\":\"0000000000000000c151df7d6ee5e2d6\",\"span_id\":\"c151df7d6ee5e2d6\",\"trace_state\":\"dd=t.dm:-0,ot=rv:ea5f0f7db45435;th:0\",\"attributes\":{\"_dd.p.dm\":\"-0\"}}]"
|
35dfbcb to
3f39364
Compare
Benchmarks [ tracer ]Benchmark execution time: 2026-09-14 19:15:08 Comparing candidate commit 38c7c80 in PR branch Found 0 performance improvements and 14 performance regressions! Performance is the same for 179 metrics, 1 unstable metrics.
|
Pack 56-bit values and their lengths into two words, share optional unknown fields, and release them across extraction, inheritance, fork, and shutdown. Group root flags so root spans remain in the original allocator size class.
PHP 7.0 interprets void as a class return type, causing report() to throw when it returns without a value. Keep the helper untyped without changing the caps assertions.
The Valgrind LEAK label is caused by PCRE JIT vectorized reads in report(), not leaked sampling-state storage. Parse the ot member and foo field directly while preserving the ownership scenarios and expected output. Verified the original test reports LEAK and the replacement passes under PHP 8.3 ARM64 Valgrind with the same temporary suppression for an unrelated local Rust startup warning. No project suppressions changed. Normal regression suite: 57 passed, one skipped.
bwoebi
left a comment
There was a problem hiding this comment.
Looks good to me now, thanks!
Description
Add support for OTel sampling in distributed tracing, by reading and emitting ot.th and ot.rv tags. These tags will be forwarded to services using OTel SDKs, that should forward them to the backend.
Distributed tracing will work between DD-instrumented services and OTel-instrumented services, downstream OTel services will be able to forward the th field it to the collector and backend, which will calculate metrics correctly
Locally passes DataDog/system-tests#7518
Reviewer checklist