feat(profiling): Export OTEL Thread Context API - #2181
Conversation
🎉 All green!🧪 All tests passed 🎯 Code Coverage (details) 🔗 Commit SHA: 364b79f | Docs | Datadog PR Page | Give us feedback! |
acfa4fc to
901731b
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: acfa4fca61
ℹ️ 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".
Artifact Size Benchmark Reportaarch64-alpine-linux-musl
aarch64-unknown-linux-gnu
libdatadog-x64-windows
libdatadog-x86-windows
x86_64-alpine-linux-musl
x86_64-unknown-linux-gnu
|
ivoanjo
left a comment
There was a problem hiding this comment.
This looks reasonable BUT I'm not very familiar with our whole export setup so hopefully @morrisonlevi or @danielsn could do a quick pass here maybe?
There was a problem hiding this comment.
Pull request overview
This PR exposes the existing libdd-otel-thread-ctx-ffi C/Rust FFI surface through the libdd-profiling-ffi umbrella crate, and wires the builder packaging flow so the corresponding header can be included in profiling artifacts when enabled.
Changes:
- Re-export
libdd_otel_thread_ctx_ffi::*fromlibdd-profiling-ffibehind a newotel-thread-ctx-ffifeature. - Extend
libdd-profiling-ffifeature/dependency plumbing socbindgencan generate the OTEL thread context header when the optional dependency is enabled. - Add a
builderfeature to optionally includeotel-thread-ctx.hand enableotel-thread-ctx-ffiduring the profiling build.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| libdd-profiling-ffi/src/lib.rs | Re-exports the OTEL thread context FFI API behind a feature flag. |
| libdd-profiling-ffi/Cargo.toml | Adds optional dependency + feature wiring, including cbindgen propagation. |
| Cargo.lock | Records the new workspace dependency edge for libdd-profiling-ffi. |
| builder/src/profiling.rs | Optionally installs otel-thread-ctx.h and enables the corresponding profiling-ffi feature during builds. |
| builder/Cargo.toml | Introduces the otel-thread-ctx builder feature toggle. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
901731b to
51eefdb
Compare
BenchmarksComparisonBenchmark execution time: 2026-07-16 12:06:41 Comparing candidate commit 364b79f in PR branch Found 3 performance improvements and 4 performance regressions! Performance is the same for 170 metrics, 10 unstable metrics.
|
8073c90 to
ad5d657
Compare
…#2243) # What does this PR do? Hides sanity check symbols behind a symbol which is defined if `sanity-check` feature is enabled. # Motivation While reviewing #2181 I noticed that the sanity check symbol was included in the header unconditionally. Co-authored-by: julio.gonzalez <julio.gonzalez@datadoghq.com>
ad5d657 to
364b79f
Compare
|
/merge |
|
View all feedbacks in Devflow UI.
The expected merge time in
|
What does this PR do?
Export OTEL Thread Context APIs.
Motivation
To be used by downstream libraries
Additional Notes
Anything else we should know when reviewing?
How to test the change?
Describe here in detail how the change can be validated.