Skip to content
Draft
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
64 changes: 38 additions & 26 deletions Cargo.lock

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

16 changes: 16 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,16 @@ inherits = "release"
# #2253 consolidated `anyhow`, `serde`, `tokio` and `tracing` to the workspace
# level, so they are mirrored here too.
[workspace.dependencies]
allocator-api2 = { version = "0.2.21", default-features = false }
anyhow = { version = "1.0", default-features = false }
arc-swap = "1.7.1"
bolero = { version = "0.13.4", default-features = false }
chrono = { version = "0.4.38", default-features = false }
clap = { version = "4.3.21", default-features = false }
criterion = { version = "0.5.1", default-features = true }
cxx-build = { version = "1.0", default-features = false }
elf = { version = "0.7", default-features = false }
futures = { version = "0.3", default-features = false }
hyper = { version = "1.6", features = [
"http1",
"client",
Expand All @@ -52,12 +60,20 @@ hyper-util = { version = "0.1.10", features = [
"client",
"client-legacy",
] }
io-lifetimes = { version = "1.0", default-features = false }
libc = { version = "0.2", default-features = true }
prost-build = { version = "0.14.1", default-features = false }
protoc-bin-vendored = { version = "3.0.0", default-features = false }
rustls = { version = "0.23", default-features = false }
serde = { version = "1.0", default-features = false }
serde_json = { version = "1.0", default-features = false, features = ["alloc"] }
syn = { version = "^2", default-features = false }
tempfile = { version = "3.13", default-features = false, features = [
"getrandom",
] }
tokio = { version = "1.36", default-features = false }
tracing = { version = "0.1", default-features = false }
uuid = { version = "1.7.0", default-features = false }

[workspace.lints]
# empty for compat with libdatadog
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ RUN_TESTS_CMD := DD_SERVICE= DD_ENV= REPORT_EXIT_STATUS=1 TEST_PHP_SRCDIR=$(PROJ

C_FILES = $(shell find components components-rs ext src/dogstatsd tracer zend_abstract_interface -name '*.c' -o -name '*.h' | awk '{ printf "$(BUILD_DIR)/%s\n", $$1 }' )
TEST_FILES = $(shell find tests/ext -name '*.php*' -o -name '*.inc' -o -name '*.json' -o -name '*.yaml' -o -name 'CONFLICTS' | awk '{ printf "$(BUILD_DIR)/%s\n", $$1 }' )
RUST_FILES = $(BUILD_DIR)/Cargo.toml $(BUILD_DIR)/Cargo.lock $(shell find components-rs -name '*.c' -o -name '*.rs' -o -name 'Cargo.toml' | awk '{ printf "$(BUILD_DIR)/%s\n", $$1 }' ) $(shell find libdatadog/{build-common,datadog-ffe,datadog-ipc,datadog-ipc-macros,datadog-live-debugger,datadog-live-debugger-ffi,libdd-remote-config,datadog-sidecar,datadog-sidecar-ffi,datadog-sidecar-macros,libdd-alloc,libdd-capabilities,libdd-capabilities-impl,libdd-common,libdd-common-ffi,libdd-crashtracker,libdd-crashtracker-ffi,libdd-data-pipeline,libdd-ddsketch,libdd-dogstatsd-client,libdd-library-config,libdd-library-config-ffi,libdd-log,libdd-shared-runtime,libdd-telemetry,libdd-telemetry-ffi,libdd-tinybytes,libdd-trace-*,spawn_worker,tools/{cc_utils,sidecar_mockgen},libdd-trace-*,Cargo.toml} \( -type l -o -type f \) \( -path "*/src*" -o -path "*/examples*" -o -path "*Cargo.toml" -o -path "*/build.rs" -o -path "*/tests/dataservice.rs" -o -path "*/tests/service_functional.rs" \) -not -path "*/datadog-ipc/build.rs" -not -path "*/datadog-sidecar-ffi/build.rs")
RUST_FILES = $(BUILD_DIR)/Cargo.toml $(BUILD_DIR)/Cargo.lock $(shell find components-rs -name '*.c' -o -name '*.rs' -o -name 'Cargo.toml' | awk '{ printf "$(BUILD_DIR)/%s\n", $$1 }' ) $(shell find libdatadog/{build-common,libdd-ffe,datadog-ipc,datadog-ipc-macros,datadog-live-debugger,datadog-live-debugger-ffi,libdd-remote-config,datadog-sidecar,datadog-sidecar-ffi,datadog-sidecar-macros,libdd-alloc,libdd-capabilities,libdd-capabilities-impl,libdd-common,libdd-common-ffi,libdd-crashtracker,libdd-crashtracker-ffi,libdd-data-pipeline,libdd-ddsketch,libdd-dogstatsd-client,libdd-library-config,libdd-library-config-ffi,libdd-log,libdd-shared-runtime,libdd-telemetry,libdd-telemetry-ffi,libdd-tinybytes,libdd-trace-*,spawn_worker,tools/{cc_utils,sidecar_mockgen},libdd-trace-*,Cargo.toml} \( -type l -o -type f \) \( -path "*/src*" -o -path "*/examples*" -o -path "*Cargo.toml" -o -path "*/build.rs" -o -path "*/tests/dataservice.rs" -o -path "*/tests/service_functional.rs" \) -not -path "*/datadog-ipc/build.rs" -not -path "*/datadog-sidecar-ffi/build.rs")
ALL_OBJECT_FILES = $(C_FILES) $(RUST_FILES) $(BUILD_DIR)/Makefile
TEST_OPCACHE_FILES = $(shell find tests/opcache -name '*.php*' -o -name '.gitkeep' | awk '{ printf "$(BUILD_DIR)/%s\n", $$1 }' )
TEST_STUB_FILES = $(shell find tests/ext -type d -name 'stubs' -exec find '{}' -type f \; | awk '{ printf "$(BUILD_DIR)/%s\n", $$1 }' )
Expand Down
2 changes: 1 addition & 1 deletion components-rs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ libdd-telemetry-ffi = { path = "../libdatadog/libdd-telemetry-ffi", default-feat
datadog-live-debugger = { path = "../libdatadog/datadog-live-debugger" }
datadog-live-debugger-ffi = { path = "../libdatadog/datadog-live-debugger-ffi", default-features = false }
datadog-ipc = { path = "../libdatadog/datadog-ipc" }
datadog-ffe = { path = "../libdatadog/datadog-ffe" }
datadog-ffe = { package = "libdd-ffe", path = "../libdatadog/libdd-ffe" }
libdd-remote-config = { path = "../libdatadog/libdd-remote-config" }
datadog-sidecar = { path = "../libdatadog/datadog-sidecar" }
datadog-sidecar-ffi = { path = "../libdatadog/datadog-sidecar-ffi" }
Expand Down
10 changes: 5 additions & 5 deletions components-rs/remote_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,12 +164,12 @@ pub unsafe extern "C" fn ddog_init_remote_config(flags: RemoteConfigFlags) {
}

if live_debugging_enabled {
DATADOG_REMOTE_CONFIG_PRODUCTS.push(RemoteConfigProduct::LiveDebugger)
DATADOG_REMOTE_CONFIG_PRODUCTS.push(RemoteConfigProduct::LiveDebugging)
}

if appsec_config {
DATADOG_REMOTE_CONFIG_PRODUCTS.push(RemoteConfigProduct::AsmData);
DATADOG_REMOTE_CONFIG_PRODUCTS.push(RemoteConfigProduct::AsmDD);
DATADOG_REMOTE_CONFIG_PRODUCTS.push(RemoteConfigProduct::AsmDd);
DATADOG_REMOTE_CONFIG_PRODUCTS.push(RemoteConfigProduct::Asm);
[
RemoteConfigCapabilities::AsmIpBlocking,
Expand Down Expand Up @@ -390,7 +390,7 @@ pub extern "C" fn ddog_process_remote_configs(remote_config: &mut RemoteConfigSt
} => {
if let Some(data) = value.data {
match value.product {
RemoteConfigProduct::LiveDebugger => {
RemoteConfigProduct::LiveDebugging => {
let val = Box::new((data, MaybeShmLimiter::open(limiter_index)));
let rc_ref: &mut RemoteConfigState = unsafe { mem::transmute(remote_config as *mut _) }; // sigh, borrow checker
let config_id = value.config_id.clone();
Expand Down Expand Up @@ -439,7 +439,7 @@ pub extern "C" fn ddog_process_remote_configs(remote_config: &mut RemoteConfigSt
}
}
RemoteConfigUpdate::Remove(path) => match path.product {
RemoteConfigProduct::LiveDebugger => {
RemoteConfigProduct::LiveDebugging => {
if let Some(boxed) = remote_config.live_debugger.active.remove(&path.config_id) {
if let Some(debugger) = boxed.0.downcast::<LiveDebuggingData>() {
remove_config(remote_config, &path.config_id, debugger);
Expand Down Expand Up @@ -755,7 +755,7 @@ pub extern "C" fn ddog_rshutdown_remote_config(remote_config: &mut RemoteConfigS
remote_config.dynamic_config.merged_configs.clear();
remote_config.manager.unload_configs(&[
RemoteConfigProduct::ApmTracing,
RemoteConfigProduct::LiveDebugger,
RemoteConfigProduct::LiveDebugging,
]);
}

Expand Down
8 changes: 7 additions & 1 deletion components-rs/telemetry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ pub unsafe extern "C" fn ddog_sidecar_telemetry_addIntegration_buffer(
version,
compatible: None,
auto_enabled: None,
error: None,
});
buffer.buffer.push(SidecarAction::Telemetry(action));
}
Expand All @@ -121,6 +122,8 @@ pub unsafe extern "C" fn ddog_sidecar_telemetry_addDependency_buffer(
let action = TelemetryActions::AddDependency(Dependency {
name: dependency_name.to_utf8_lossy().into_owned(),
version,
hash: None,
metadata: None,
});
buffer.buffer.push(SidecarAction::Telemetry(action));
}
Expand All @@ -139,6 +142,9 @@ pub unsafe extern "C" fn ddog_sidecar_telemetry_addEndpoint_buffer(
path: Some(path.to_utf8_lossy().into_owned()),
operation_name: operation_name.to_utf8_lossy().into_owned(),
resource_name: resource_name.to_utf8_lossy().into_owned(),
request_body_type: None,
response_body_type: None,
response_code: None,
});
buffer.buffer.push(SidecarAction::Telemetry(action));
}
Expand All @@ -158,7 +164,7 @@ pub unsafe extern "C" fn ddog_sidecar_telemetry_enqueueConfig_buffer(
};
let action = TelemetryActions::AddConfig(data::Configuration {
name: config_key.to_utf8_lossy().into_owned(),
value: config_value.to_utf8_lossy().into_owned(),
value: Some(config_value.to_utf8_lossy().into_owned()),
origin,
config_id,
seq_id: None,
Expand Down
2 changes: 1 addition & 1 deletion libdatadog
Submodule libdatadog updated 214 files
13 changes: 13 additions & 0 deletions tests/ext/ffe/system_test_data_evaluate.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,19 @@ function run_fixture_case($client, $fileName, $index, array $case, array &$failu
. ': value got=' . encode_value($details->getValue())
. ' want=' . encode_value($case['result']['value']);
}

if ($details->getReason() !== $case['result']['reason']) {
$failures[] = $fileName . '#' . $index
. ': reason got=' . encode_value($details->getReason())
. ' want=' . encode_value($case['result']['reason']);
}

if (array_key_exists('errorCode', $case['result'])
&& $details->getErrorCode() !== $case['result']['errorCode']) {
$failures[] = $fileName . '#' . $index
. ': errorCode got=' . encode_value($details->getErrorCode())
. ' want=' . encode_value($case['result']['errorCode']);
}
}

function evaluate_fixture_case($client, $variationType, $flag, $defaultValue, array $context)
Expand Down
Loading