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 components-rs/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,7 @@ typedef enum ddog_RemoteConfigProduct {
DDOG_REMOTE_CONFIG_PRODUCT_FFE_FLAGS,
DDOG_REMOTE_CONFIG_PRODUCT_LIVE_DEBUGGING,
DDOG_REMOTE_CONFIG_PRODUCT_LIVE_DEBUGGING_SYMBOL_DB,
DDOG_REMOTE_CONFIG_PRODUCT_DEBUG,
} ddog_RemoteConfigProduct;

typedef enum ddog_SpanProbeTarget {
Expand Down
19 changes: 10 additions & 9 deletions components-rs/remote_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ pub unsafe extern "C" fn ddog_init_remote_config_state(
language: "php".to_string(),
tracer_version: include_str!("../VERSION").trim().into(),
endpoint: endpoint.clone(),
agentless: None,
}, registry),
live_debugger: LiveDebuggerState {
di_enabled,
Expand Down Expand Up @@ -389,12 +390,12 @@ pub extern "C" fn ddog_process_remote_configs(remote_config: &mut RemoteConfigSt
limiter_index,
} => {
if let Some(data) = value.data {
match value.product {
match value.path.product() {
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();
let entry = remote_config.live_debugger.active.entry(value.config_id);
let config_id = value.path.config_id();
let entry = remote_config.live_debugger.active.entry(config_id.to_string());
let (parsed, limiter) = match entry {
Entry::Occupied(mut e) => {
e.insert(val);
Expand All @@ -407,7 +408,7 @@ pub extern "C" fn ddog_process_remote_configs(remote_config: &mut RemoteConfigSt
}
};
if let Some(debugger) = parsed.downcast::<LiveDebuggingData>() {
apply_config(rc_ref, &config_id, debugger, limiter);
apply_config(rc_ref, config_id, debugger, limiter);
}
}
RemoteConfigProduct::ApmTracing => {
Expand All @@ -416,7 +417,7 @@ pub extern "C" fn ddog_process_remote_configs(remote_config: &mut RemoteConfigSt
let configs: Vec<Configs> = config_data.lib_config.clone().into();
if !configs.is_empty() {
remote_config.dynamic_config.active_configs
.insert(value.config_id, ActiveDynamicConfig { priority, configs });
.insert(value.path.config_id().to_string(), ActiveDynamicConfig { priority, configs });
let merged = compute_merged_configs(&remote_config.dynamic_config.active_configs);
insert_new_configs(
&mut remote_config.dynamic_config.old_config_values,
Expand All @@ -438,16 +439,16 @@ pub extern "C" fn ddog_process_remote_configs(remote_config: &mut RemoteConfigSt
}
}
}
RemoteConfigUpdate::Remove(path) => match path.product {
RemoteConfigUpdate::Remove(path) => match path.product() {
RemoteConfigProduct::LiveDebugging => {
if let Some(boxed) = remote_config.live_debugger.active.remove(&path.config_id) {
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);
remove_config(remote_config, path.config_id(), debugger);
}
}
}
RemoteConfigProduct::ApmTracing => {
if remote_config.dynamic_config.active_configs.remove(&path.config_id).is_some() {
if remote_config.dynamic_config.active_configs.remove(path.config_id()).is_some() {
if remote_config.dynamic_config.active_configs.is_empty() {
remove_old_configs(remote_config);
} else {
Expand Down
2 changes: 1 addition & 1 deletion libdatadog
Submodule libdatadog updated 59 files
+1 −0 .github/workflows/lint.yml
+3 −0 .github/workflows/test-ffi.yml
+3 −0 .github/workflows/test.yml
+1 −0 AGENTS.md
+107 −44 Cargo.lock
+2 −0 LICENSE-3rdparty.csv
+34 −0 bin_tests/build.rs
+9 −0 bin_tests/src/bin/crashtracker_bin_test.rs
+10 −0 bin_tests/src/c/trigger_assert.c
+6 −2 bin_tests/src/test_types.rs
+44 −0 bin_tests/tests/crashtracker_bin_test.rs
+1 −0 datadog-sidecar-ffi/src/lib.rs
+1 −0 datadog-sidecar/src/service/sidecar_server.rs
+24 −39 datadog-sidecar/src/shm_remote_config.rs
+19 −1 libdd-common/src/lib.rs
+1 −0 libdd-crashtracker/Cargo.toml
+2 −0 libdd-crashtracker/src/collector/api.rs
+319 −0 libdd-crashtracker/src/collector/assert_interceptor.rs
+4 −4 libdd-crashtracker/src/collector/collector_manager.rs
+24 −9 libdd-crashtracker/src/collector/crash_handler.rs
+21 −52 libdd-crashtracker/src/collector/emitters.rs
+2 −0 libdd-crashtracker/src/collector/mod.rs
+3 −2 libdd-data-pipeline/src/trace_exporter/mod.rs
+12 −3 libdd-data-pipeline/tests/test_trace_exporter_otlp_export.rs
+14 −2 libdd-ffe-ffi/src/assignment.rs
+1 −1 libdd-ffe-test-suite/ffe-system-test-data
+5 −7 libdd-ffe-test-suite/tests/canonical_fixtures.rs
+4 −1 libdd-ffe/src/rules_based/error.rs
+68 −0 libdd-ffe/src/rules_based/eval/eval_assignment.rs
+3 −1 libdd-ffe/src/rules_based/eval/eval_rules.rs
+2 −2 libdd-ffe/src/rules_based/ufc/models.rs
+1 −1 libdd-gotter/README.md
+227 −14 libdd-gotter/src/elf.rs
+38 −9 libdd-remote-config/Cargo.toml
+306 −0 libdd-remote-config/examples/remote_config_agentless_bench.rs
+69 −10 libdd-remote-config/examples/remote_config_fetch.rs
+73 −0 libdd-remote-config/roots/gov/config_root.json
+73 −0 libdd-remote-config/roots/gov/director_root.json
+73 −0 libdd-remote-config/roots/prod/config_root.json
+73 −0 libdd-remote-config/roots/prod/director_root.json
+73 −0 libdd-remote-config/roots/staging/config_root.json
+73 −0 libdd-remote-config/roots/staging/director_root.json
+1,663 −0 libdd-remote-config/src/fetch/agentless.rs
+1,262 −0 libdd-remote-config/src/fetch/agentless/integration_tests.rs
+203 −60 libdd-remote-config/src/fetch/fetcher.rs
+7 −0 libdd-remote-config/src/fetch/mod.rs
+21 −2 libdd-remote-config/src/fetch/shared.rs
+74 −10 libdd-remote-config/src/fetch/single.rs
+3 −2 libdd-remote-config/src/fetch/test_server.rs
+7 −9 libdd-remote-config/src/file_change_tracker.rs
+1 −1 libdd-remote-config/src/file_storage.rs
+9 −18 libdd-remote-config/src/parse.rs
+259 −61 libdd-remote-config/src/path.rs
+2 −0 libdd-shared-runtime/src/lib.rs
+63 −0 libdd-shared-runtime/src/shared_runtime/basic.rs
+86 −0 libdd-shared-runtime/src/shared_runtime/mod.rs
+1 −0 libdd-tracer-flare/Cargo.toml
+26 −38 libdd-tracer-flare/src/lib.rs
+1 −0 tools/docker/Dockerfile.build
Loading