Skip to content

Commit 93923bf

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

3 files changed

Lines changed: 19 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: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -650,13 +650,15 @@ pub extern "C" fn ddog_remote_configs_service_env_change(
650650
tags: &libdd_common_ffi::Vec<Tag>,
651651
process_tags: &libdd_common_ffi::Vec<Tag>,
652652
) -> bool {
653-
let new_target = Target {
654-
service: service.to_utf8_lossy().to_string(),
655-
env: env.to_utf8_lossy().to_string(),
656-
app_version: version.to_utf8_lossy().to_string(),
657-
tags: tags.as_slice().to_vec(),
658-
process_tags: process_tags.as_slice().to_vec(),
659-
};
653+
// `Target`'s fields are private since libdatadog #2182; construct via `Target::new`,
654+
// which expects `tags`/`process_tags` as already-formatted `"key:value"` strings.
655+
let new_target = Target::new(
656+
service.to_utf8_lossy().to_string(),
657+
env.to_utf8_lossy().to_string(),
658+
version.to_utf8_lossy().to_string(),
659+
tags.as_slice().iter().map(|t| t.to_string()).collect(),
660+
process_tags.as_slice().iter().map(|t| t.to_string()).collect(),
661+
);
660662

661663
if let Some(target) = remote_config.manager.get_target() {
662664
if **target == new_target {
@@ -798,7 +800,7 @@ pub unsafe extern "C" fn ddog_send_debugger_diagnostics<'a>(
798800
remote_config_state
799801
.manager
800802
.get_target()
801-
.map_or("", |t| t.service.as_str()),
803+
.map_or("", |t| t.service()),
802804
);
803805
let mut payload = ddog_debugger_diagnostics_create_unboxed(
804806
probe,

components-rs/stats.rs

Lines changed: 8 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,13 @@ 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+
// `FixedAggregationKey::is_trace_root` became `pb::Trilean` (libdatadog #2158);
153+
// the PHP side still supplies a plain bool.
154+
is_trace_root: if span.is_trace_root {
155+
Trilean::True
156+
} else {
157+
Trilean::False
158+
},
152159
grpc_status_code: extract_grpc_status_code(span),
153160
service_source: char_slice_str(span.service_source),
154161
}

0 commit comments

Comments
 (0)