Add standalone datadog-ipc-helper binary#3713
Conversation
Extract the sidecar into a dedicated `datadog-ipc-helper` binary (new `components-rs/sidecar-bin` crate) that is located at runtime alongside the `ddtrace.so` path, removing the `php_shared_build` cfg flag and the old `php_sidecar_mockgen` crate entirely. Build script gains platform specific RUSTFLAGS for the sidecar binary: musl disables static CRT (needed for dlopen of the AppSec helper) and mac os switches fat LTO to thin LTO to work around problems with the llvm mac os linker.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #3713 +/- ##
==========================================
- Coverage 68.74% 68.38% -0.36%
==========================================
Files 166 166
Lines 19030 18940 -90
Branches 1797 1794 -3
==========================================
- Hits 13082 12953 -129
- Misses 5132 5174 +42
+ Partials 816 813 -3
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 2 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
Benchmarks [ tracer ]Benchmark execution time: 2026-03-19 19:50:28 Comparing candidate commit 3fbbd84 in PR branch Found 2 performance improvements and 0 performance regressions! Performance is the same for 191 metrics, 1 unstable metrics. scenario:ComposerTelemetryBench/benchTelemetryParsing
scenario:MessagePackSerializationBench/benchMessagePackSerialization
|
|
✨ Fix all issues with BitsAI or with Cursor
|
8053291 to
2003030
Compare
2003030 to
f85a1a0
Compare
find_sidecar_binary() locates datadog-ipc-helper relative to ddtrace.so via dladdr. The appsec extension xtest build (cmake) only runs the inner PHP Makefile, never the outer repo Makefile's all target, so the outer Makefile's $(SIDECAR_BIN_IN_MODULES) copy rule never fires. Copying in compile_rust.sh ensures the binary lands next to ddtrace.so in every build path. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
In the cmake appsec test build, extension_dir contains a symlink ddtrace.so → tmp/build_extension/modules/ddtrace.so. dladdr may return the symlink path rather than the real path. Canonicalizing ensures find_sidecar_binary() always looks in the directory where the real ddtrace.so lives, where we already copy datadog-ipc-helper. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
CI test jobs download pre-built ddtrace.so without running cargo, so SIDECAR_BIN doesn't exist in those contexts. Making the ipc-helper copy in the install target conditional on the binary existing prevents make from failing when it's not present. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Previously the script called sys.exit(1) as soon as any job failed, leaving hundreds of still-running jobs unreported. Now it waits for running==0 before exiting so the final failure list is complete. Also document in CLAUDE.md that conclusions must not be drawn until running==0, and that Haiku agents need a long enough Bash timeout. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
compile_rust.sh: only copy datadog-ipc-helper when CARGO_TARGET_DIR is absolute. build-sidecar.sh uses a relative 'target' dir and doesn't need the binary placed in modules/; the unconditional cp was failing because cargo's output is relative to the workspace root (one level above components-rs/) while cp was called from inside components-rs/. libdatadog: add IntoRawHandle to spawn_worker Windows imports so that into_raw_handle() is in scope on Windows builds. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
05aa5d1 to
46aad4b
Compare
compile extension: move datadog-ipc-helper to modules/{version}/ in
after_script so it travels with ddtrace.so as a CI artifact.
test jobs: also mv datadog-ipc-helper to tmp/build_extension/modules/
so make install can find it at SIDECAR_BIN_IN_MODULES.
Makefile install: try SIDECAR_BIN_IN_MODULES first (populated by both
compile_rust.sh and the artifact mv step), falling back to SIDECAR_BIN
(built from source).
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
build-sidecar.sh: produce datadog-ipc-helper${arch}[${suffix}] alongside
libddtrace_php artifacts.
generate-package.php: include datadog-ipc-helper* in build-sidecar
artifact paths so link-tracing-extension can pick it up.
link-tracing-extension.sh: copy datadog-ipc-helper into extensions_arch/
so it travels with ddtrace.so into installer packages (.deb/.rpm/.apk)
and the verify tests (/opt/datadog-php/extensions/).
generate-ssi-package.sh: copy datadog-ipc-helper into the SSI loader/
directory alongside libddtrace_php.so.
generate-final-artifact.sh: copy datadog-ipc-helper into each
ext/$php_api/ directory so it sits next to ddtrace.so in the
dd-library-php bundle.
ffi.rs: run rustfmt to fix formatting check failure.
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
rc_notify.rs: rustfmt to fix cargo fmt check.
datadog-setup.php: copy datadog-ipc-helper to the PHP extension
directory alongside ddtrace.so. The installer copies ddtrace.so from
trace/ext/{api}/ to the system PHP ext dir; find_sidecar_binary() then
looks for datadog-ipc-helper in that same directory.
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
…n compile_extension.sh Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
…nt paths Without export, compile_rust.sh never sees the variable and cargo defaults to the workspace-root target/, but compile_extension.sh's link step used the local variable value — path mismatch broke the link step. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Extract the sidecar into a dedicated
datadog-ipc-helperbinary (newcomponents-rs/sidecar-bincrate) that is located at runtime alongside theddtrace.sopath, removing thephp_shared_buildcfg flag and the oldphp_sidecar_mockgencrate entirely.Build script gains platform specific RUSTFLAGS for the sidecar binary: musl disables static CRT (needed for dlopen of the AppSec helper) and mac os switches fat LTO to thin LTO to work around problems with the llvm mac os linker.
Description
Reviewer checklist