Skip to content

Commit 1a59946

Browse files
libdatadog update to efbbf4c1 [no-ci-feedback]
Automated update by CI pipeline https://gitlab.ddbuild.io/DataDog/apm-reliability/dd-trace-php/-/pipelines/135100943 Full CI result: ❌ 176 job(s) failed
1 parent dce1c3b commit 1a59946

1 file changed

Lines changed: 21 additions & 12 deletions

File tree

components-rs/sidecar.rs

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -65,31 +65,40 @@ pub extern "C" fn ddog_sidecar_enable_appsec(
6565
log_level: CharSlice,
6666
) -> () {
6767
let mut appsec_config_guard = APPSEC_CONFIG.lock().unwrap();
68-
let shared_lib_path_os: std::ffi::OsString;
69-
let socket_file_path_os: std::ffi::OsString;
70-
let lock_file_path_os: std::ffi::OsString;
7168
let log_file_path_os: std::ffi::OsString;
7269

7370
#[cfg(unix)]
7471
{
75-
shared_lib_path_os = OsStr::from_bytes(shared_lib_path.as_bytes()).to_owned();
76-
socket_file_path_os = OsStr::from_bytes(socket_file_path.as_bytes()).to_owned();
77-
lock_file_path_os = OsStr::from_bytes(lock_file_path.as_bytes()).to_owned();
7872
log_file_path_os = OsStr::from_bytes(log_file_path.as_bytes()).to_owned();
7973
}
8074

8175
#[cfg(windows)]
8276
{
83-
shared_lib_path_os = OsStr::new(&*shared_lib_path.to_utf8_lossy()).to_owned();
84-
socket_file_path_os = OsStr::new(&*socket_file_path.to_utf8_lossy()).to_owned();
85-
lock_file_path_os = OsStr::new(&*lock_file_path.to_utf8_lossy()).to_owned();
8677
log_file_path_os = OsStr::new(&*log_file_path.to_utf8_lossy()).to_owned();
8778
}
8879

80+
// libdatadog dropped `AppSecConfig::{shared_lib_path, socket_file_path,
81+
// lock_file_path}` (libdatadog#2310). The sidecar no longer loads the
82+
// helper as a shared library dependency, no longer calls its
83+
// `appsec_helper_main`/`appsec_helper_shutdown` entry points, and no longer
84+
// forwards the socket/lock paths to the daemon's environment. It instead
85+
// expects an in-process `AppSecBackend` registered through
86+
// `datadog_sidecar::appsec::register_backend_factory`, with requests routed
87+
// over the sidecar transport via `ddog_sidecar_send_appsec_message`.
88+
//
89+
// dd-trace-php has not been ported to that model yet, so these three paths
90+
// have nowhere to go and the helper will not be started for us. The
91+
// remaining fields are still honoured, so keep publishing the config: it is
92+
// what makes the sidecar attempt to bring appsec up at all.
93+
warn!(
94+
"This libdatadog no longer starts the appsec helper on the tracer's \
95+
behalf; appsec will be unavailable (helper {}, socket {}, lock {})",
96+
shared_lib_path.to_utf8_lossy(),
97+
socket_file_path.to_utf8_lossy(),
98+
lock_file_path.to_utf8_lossy(),
99+
);
100+
89101
appsec_config_guard.deref_mut().replace(AppSecConfig {
90-
shared_lib_path: shared_lib_path_os,
91-
socket_file_path: socket_file_path_os,
92-
lock_file_path: lock_file_path_os,
93102
log_file_path: log_file_path_os,
94103
log_level: log_level.to_utf8_lossy().to_string(),
95104
});

0 commit comments

Comments
 (0)