Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions builder/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ log = []
ddsketch = []
ffe = []
shared-runtime = []
otel-thread-ctx = []
Comment thread
gleocadie marked this conversation as resolved.
regex-lite = ["libdd-common/regex-lite"]

[lib]
Expand Down
4 changes: 4 additions & 0 deletions builder/src/profiling.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ impl Profiling {
headers.push("ffe.h");
#[cfg(feature = "shared-runtime")]
headers.push("shared-runtime.h");
#[cfg(feature = "otel-thread-ctx")]
headers.push("otel-thread-ctx.h");

let mut origin_path: PathBuf = [&self.source_include, "dummy.h"].iter().collect();
let mut target_path: PathBuf = [&self.target_include, "dummy.h"].iter().collect();
Expand Down Expand Up @@ -133,6 +135,8 @@ impl Module for Profiling {
let features = self.features.to_string() + "," + "cbindgen";
#[cfg(feature = "crashtracker")]
let features = features.add(",crashtracker-collector,crashtracker-receiver,demangler");
#[cfg(feature = "otel-thread-ctx")]
let features = features.add(",otel-thread-ctx-ffi");

// Using rustc instead of build in order to overcome issues with LTO optimization.
let mut cargo_args = vec![
Expand Down
4 changes: 3 additions & 1 deletion libdd-profiling-ffi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ name = "datadog_profiling_ffi"

[features]
default = ["ddcommon-ffi"]
cbindgen = ["build_common/cbindgen", "libdd-common-ffi/cbindgen", "libdd-shared-runtime-ffi?/cbindgen"]
cbindgen = ["build_common/cbindgen", "libdd-common-ffi/cbindgen", "libdd-shared-runtime-ffi?/cbindgen", "libdd-otel-thread-ctx-ffi?/cbindgen"]
ddtelemetry-ffi = ["dep:libdd-telemetry-ffi"]
datadog-log-ffi = ["dep:libdd-log-ffi"]
symbolizer = ["symbolizer-ffi"]
Expand All @@ -34,6 +34,7 @@ ddcommon-ffi = ["dep:libdd-common-ffi"]
ddsketch-ffi = ["dep:libdd-ddsketch-ffi"]
datadog-ffe-ffi = ["dep:datadog-ffe-ffi"]
shared-runtime = ["dep:libdd-shared-runtime-ffi", "libdd-shared-runtime-ffi/catch_panic"]
otel-thread-ctx-ffi = ["dep:libdd-otel-thread-ctx-ffi"]
regex-lite = ["libdd-common/regex-lite"]

[build-dependencies]
Expand Down Expand Up @@ -62,3 +63,4 @@ thiserror = "2"
tokio-util = "0.7.1"
datadog-ffe-ffi = { path = "../datadog-ffe-ffi", default-features = false, optional = true }
libdd-shared-runtime-ffi = { path = "../libdd-shared-runtime-ffi", default-features = false, optional = true }
libdd-otel-thread-ctx-ffi = { path = "../libdd-otel-thread-ctx-ffi", default-features = false, optional = true }
5 changes: 5 additions & 0 deletions libdd-profiling-ffi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,8 @@ pub use libdd_shared_runtime_ffi::*;
// re-export tracer metadata functions
#[cfg(feature = "ddcommon-ffi")]
pub use libdd_common_ffi::*;

// re-export otel-thread-ctx ffi
#[cfg(feature = "otel-thread-ctx-ffi")]
#[allow(unused_imports)]
pub use libdd_otel_thread_ctx_ffi::*;
Loading