Skip to content

Commit 5d3f10e

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

3 files changed

Lines changed: 22 additions & 9 deletions

File tree

components-rs/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ libdd-data-pipeline = { path = "../libdatadog/libdd-data-pipeline" }
2323
libdd-tinybytes = { path = "../libdatadog/libdd-tinybytes" }
2424
libdd-trace-utils = { path = "../libdatadog/libdd-trace-utils" }
2525
libdd-trace-stats = { path = "../libdatadog/libdd-trace-stats" }
26+
libdd-trace-protobuf = { path = "../libdatadog/libdd-trace-protobuf" }
2627
libdd-crashtracker-ffi = { path = "../libdatadog/libdd-crashtracker-ffi", default-features = false, features = ["collector"] }
2728
libdd-library-config-ffi = { path = "../libdatadog/libdd-library-config-ffi", default-features = false }
2829
spawn_worker = { path = "../libdatadog/spawn_worker" }

components-rs/remote_config.rs

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -639,13 +639,19 @@ pub extern "C" fn ddog_remote_configs_service_env_change(
639639
tags: &libdd_common_ffi::Vec<Tag>,
640640
process_tags: &libdd_common_ffi::Vec<Tag>,
641641
) -> bool {
642-
let new_target = Target {
643-
service: service.to_utf8_lossy().to_string(),
644-
env: env.to_utf8_lossy().to_string(),
645-
app_version: version.to_utf8_lossy().to_string(),
646-
tags: tags.as_slice().to_vec(),
647-
process_tags: process_tags.as_slice().to_vec(),
648-
};
642+
// `Target` fields are now private; construct through `Target::new`, which expects the tags as
643+
// already-formatted `"key:value"` strings (libdd-remote-config no longer stores `Tag`s).
644+
let new_target = Target::new(
645+
service.to_utf8_lossy().to_string(),
646+
env.to_utf8_lossy().to_string(),
647+
version.to_utf8_lossy().to_string(),
648+
tags.as_slice().iter().map(|tag| tag.to_string()).collect(),
649+
process_tags
650+
.as_slice()
651+
.iter()
652+
.map(|tag| tag.to_string())
653+
.collect(),
654+
);
649655

650656
if let Some(target) = remote_config.manager.get_target() {
651657
if **target == new_target {
@@ -781,7 +787,7 @@ pub unsafe extern "C" fn ddog_send_debugger_diagnostics<'a>(
781787
remote_config_state
782788
.manager
783789
.get_target()
784-
.map_or("", |t| t.service.as_str()),
790+
.map_or("", |t| t.service()),
785791
);
786792
let mut payload = ddog_debugger_diagnostics_create_unboxed(
787793
probe,

components-rs/stats.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ use crate::trace_filter;
1111
use datadog_ipc::shm_stats::{OwnedShmSpanInput, ShmSpanConcentrator, ShmSpanInput, MAX_PEER_TAGS};
1212
use datadog_sidecar::service::blocking::{add_span_to_concentrator, SidecarTransport};
1313
use libdd_trace_stats::span_concentrator::FixedAggregationKey;
14+
use libdd_trace_protobuf::pb::Trilean;
1415
use libdd_common_ffi::slice::{AsBytes, CharSlice};
1516
use std::collections::HashMap;
1617
use std::ffi::{c_char, c_void};
@@ -148,7 +149,12 @@ fn build_fixed_key<'a>(span: &'a PhpSpanStats<'a>) -> FixedAggregationKey<&'a st
148149
http_endpoint: extract_http_endpoint(span),
149150
http_status_code: extract_http_status_code(span),
150151
is_synthetics_request: is_synthetics_request(span),
151-
is_trace_root: span.is_trace_root,
152+
// `is_trace_root` is now a `Trilean` (unset/true/false) rather than a plain `bool`.
153+
is_trace_root: if span.is_trace_root {
154+
Trilean::True
155+
} else {
156+
Trilean::False
157+
},
152158
grpc_status_code: extract_grpc_status_code(span),
153159
service_source: char_slice_str(span.service_source),
154160
}

0 commit comments

Comments
 (0)