Skip to content

Commit 486fa25

Browse files
libdatadog update to 3da894a0 [no-ci-feedback]
Automated update by CI pipeline https://gitlab.ddbuild.io/DataDog/apm-reliability/dd-trace-php/-/pipelines/130642899 Full CI result: ❌ 233 job(s) failed
1 parent 9acb0e4 commit 486fa25

5 files changed

Lines changed: 61 additions & 12 deletions

File tree

Cargo.toml

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,29 @@ inherits = "release"
3636
#
3737
# Every dependency that a libdatadog crate inherits via `{ workspace = true }`
3838
# must be declared here, because those crates resolve their workspace
39-
# inheritance against this manifest when built as path dependencies. Keep this
40-
# list in sync with libdatadog's own `[workspace.dependencies]`; libdatadog
41-
# #2253 consolidated `anyhow`, `serde`, `tokio` and `tracing` to the workspace
42-
# level, so they are mirrored here too.
39+
# inheritance against this manifest when built as path dependencies. Note that
40+
# manifest parsing resolves inheritance for *every* dependency table, including
41+
# `dev-dependencies` of crates we never build, so this has to be a full mirror
42+
# of libdatadog's `[workspace.dependencies]` rather than only the subset we
43+
# link against. libdatadog #2253/#2270/#2283/#2296 ("migrate to workspace
44+
# dependencies", phases 1-4) moved the bulk of its dependencies to the
45+
# workspace level, so keep this list in sync with libdatadog's own
46+
# `[workspace.dependencies]` on every submodule bump.
47+
#
48+
# Only deviations from libdatadog: `hyper`/`hyper-util` additionally enable the
49+
# client/http1 features that our own build needs. Extra features are additive,
50+
# so libdatadog crates inheriting them still get at least what they asked for.
4351
[workspace.dependencies]
52+
allocator-api2 = { version = "0.2.21", default-features = false }
4453
anyhow = { version = "1.0", default-features = false }
4554
arc-swap = "1.7.1"
55+
bolero = { version = "0.13.4", default-features = false }
56+
chrono = { version = "0.4.38", default-features = false }
57+
clap = { version = "4.3.21", default-features = false }
58+
criterion = { version = "0.5.1", default-features = true }
59+
cxx-build = { version = "1.0", default-features = false }
60+
elf = { version = "0.7", default-features = false }
61+
futures = { version = "0.3", default-features = false }
4662
hyper = { version = "1.6", features = [
4763
"http1",
4864
"client",
@@ -52,12 +68,20 @@ hyper-util = { version = "0.1.10", features = [
5268
"client",
5369
"client-legacy",
5470
] }
71+
io-lifetimes = { version = "1.0", default-features = false }
72+
libc = { version = "0.2", default-features = true }
5573
prost-build = { version = "0.14.1", default-features = false }
5674
protoc-bin-vendored = { version = "3.0.0", default-features = false }
75+
rustls = { version = "0.23", default-features = false }
5776
serde = { version = "1.0", default-features = false }
5877
serde_json = { version = "1.0", default-features = false, features = ["alloc"] }
78+
syn = { version = "^2", default-features = false }
79+
tempfile = { version = "3.13", default-features = false, features = [
80+
"getrandom",
81+
] }
5982
tokio = { version = "1.36", default-features = false }
6083
tracing = { version = "0.1", default-features = false }
84+
uuid = { version = "1.7.0", default-features = false }
6185

6286
[workspace.lints]
6387
# empty for compat with libdatadog

appsec/src/helper/service.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,8 @@ template <> struct fmt::formatter<ddog_MetricType> {
379379
return fmt::format_to(ctx.out(), "COUNT");
380380
case DDOG_METRIC_TYPE_DISTRIBUTION:
381381
return fmt::format_to(ctx.out(), "DISTRIBUTION");
382+
case DDOG_METRIC_TYPE_RATE:
383+
return fmt::format_to(ctx.out(), "RATE");
382384
}
383385
return fmt::format_to(ctx.out(), "UNKNOWN");
384386
}

components-rs/common.h

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,9 @@ typedef enum ddog_ConfigurationOrigin {
283283
DDOG_CONFIGURATION_ORIGIN_LOCAL_STABLE_CONFIG,
284284
DDOG_CONFIGURATION_ORIGIN_FLEET_STABLE_CONFIG,
285285
DDOG_CONFIGURATION_ORIGIN_CALCULATED,
286+
DDOG_CONFIGURATION_ORIGIN_OTEL_ENV_VAR,
287+
DDOG_CONFIGURATION_ORIGIN_INI,
288+
DDOG_CONFIGURATION_ORIGIN_UNKNOWN,
286289
} ddog_ConfigurationOrigin;
287290

288291
typedef enum ddog_DynamicConfigUpdateMode {
@@ -349,12 +352,17 @@ typedef enum ddog_MetricNamespace {
349352
DDOG_METRIC_NAMESPACE_TELEMETRY,
350353
DDOG_METRIC_NAMESPACE_APM,
351354
DDOG_METRIC_NAMESPACE_SIDECAR,
355+
DDOG_METRIC_NAMESPACE_CIVISIBILITY,
356+
DDOG_METRIC_NAMESPACE_MLOBS,
357+
DDOG_METRIC_NAMESPACE_DDTRACEAPI,
358+
DDOG_METRIC_NAMESPACE_AI_GUARD,
352359
} ddog_MetricNamespace;
353360

354361
typedef enum ddog_MetricType {
355362
DDOG_METRIC_TYPE_GAUGE,
356363
DDOG_METRIC_TYPE_COUNT,
357364
DDOG_METRIC_TYPE_DISTRIBUTION,
365+
DDOG_METRIC_TYPE_RATE,
358366
} ddog_MetricType;
359367

360368
typedef enum ddog_ProbeStatus {
@@ -427,8 +435,8 @@ typedef enum ddog_RemoteConfigProduct {
427435
DDOG_REMOTE_CONFIG_PRODUCT_ASM_DD,
428436
DDOG_REMOTE_CONFIG_PRODUCT_ASM_FEATURES,
429437
DDOG_REMOTE_CONFIG_PRODUCT_FFE_FLAGS,
430-
DDOG_REMOTE_CONFIG_PRODUCT_LIVE_DEBUGGER,
431-
DDOG_REMOTE_CONFIG_PRODUCT_LIVE_DEBUGGER_SYMBOL_DB,
438+
DDOG_REMOTE_CONFIG_PRODUCT_LIVE_DEBUGGING,
439+
DDOG_REMOTE_CONFIG_PRODUCT_LIVE_DEBUGGING_SYMBOL_DB,
432440
} ddog_RemoteConfigProduct;
433441

434442
typedef enum ddog_SpanProbeTarget {
@@ -1206,6 +1214,7 @@ typedef struct ddog_NativeFile {
12061214

12071215
typedef struct ddog_SidecarFlushOptions {
12081216
bool traces_and_stats;
1217+
bool flag_evaluations;
12091218
bool telemetry;
12101219
} ddog_SidecarFlushOptions;
12111220

components-rs/remote_config.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -164,12 +164,12 @@ pub unsafe extern "C" fn ddog_init_remote_config(flags: RemoteConfigFlags) {
164164
}
165165

166166
if live_debugging_enabled {
167-
DATADOG_REMOTE_CONFIG_PRODUCTS.push(RemoteConfigProduct::LiveDebugger)
167+
DATADOG_REMOTE_CONFIG_PRODUCTS.push(RemoteConfigProduct::LiveDebugging)
168168
}
169169

170170
if appsec_config {
171171
DATADOG_REMOTE_CONFIG_PRODUCTS.push(RemoteConfigProduct::AsmData);
172-
DATADOG_REMOTE_CONFIG_PRODUCTS.push(RemoteConfigProduct::AsmDD);
172+
DATADOG_REMOTE_CONFIG_PRODUCTS.push(RemoteConfigProduct::AsmDd);
173173
DATADOG_REMOTE_CONFIG_PRODUCTS.push(RemoteConfigProduct::Asm);
174174
[
175175
RemoteConfigCapabilities::AsmIpBlocking,
@@ -390,7 +390,7 @@ pub extern "C" fn ddog_process_remote_configs(remote_config: &mut RemoteConfigSt
390390
} => {
391391
if let Some(data) = value.data {
392392
match value.product {
393-
RemoteConfigProduct::LiveDebugger => {
393+
RemoteConfigProduct::LiveDebugging => {
394394
let val = Box::new((data, MaybeShmLimiter::open(limiter_index)));
395395
let rc_ref: &mut RemoteConfigState = unsafe { mem::transmute(remote_config as *mut _) }; // sigh, borrow checker
396396
let config_id = value.config_id.clone();
@@ -439,7 +439,7 @@ pub extern "C" fn ddog_process_remote_configs(remote_config: &mut RemoteConfigSt
439439
}
440440
}
441441
RemoteConfigUpdate::Remove(path) => match path.product {
442-
RemoteConfigProduct::LiveDebugger => {
442+
RemoteConfigProduct::LiveDebugging => {
443443
if let Some(boxed) = remote_config.live_debugger.active.remove(&path.config_id) {
444444
if let Some(debugger) = boxed.0.downcast::<LiveDebuggingData>() {
445445
remove_config(remote_config, &path.config_id, debugger);
@@ -755,7 +755,7 @@ pub extern "C" fn ddog_rshutdown_remote_config(remote_config: &mut RemoteConfigS
755755
remote_config.dynamic_config.merged_configs.clear();
756756
remote_config.manager.unload_configs(&[
757757
RemoteConfigProduct::ApmTracing,
758-
RemoteConfigProduct::LiveDebugger,
758+
RemoteConfigProduct::LiveDebugging,
759759
]);
760760
}
761761

components-rs/telemetry.rs

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ pub unsafe extern "C" fn ddog_sidecar_telemetry_addIntegration_buffer(
105105
version,
106106
compatible: None,
107107
auto_enabled: None,
108+
error: None,
108109
});
109110
buffer.buffer.push(SidecarAction::Telemetry(action));
110111
}
@@ -121,6 +122,10 @@ pub unsafe extern "C" fn ddog_sidecar_telemetry_addDependency_buffer(
121122
let action = TelemetryActions::AddDependency(Dependency {
122123
name: dependency_name.to_utf8_lossy().into_owned(),
123124
version,
125+
// Not reported by the PHP tracer: the SCA hash and metadata are not
126+
// available from Composer's autoloader at the point we enqueue this.
127+
hash: None,
128+
metadata: None,
124129
});
125130
buffer.buffer.push(SidecarAction::Telemetry(action));
126131
}
@@ -139,6 +144,11 @@ pub unsafe extern "C" fn ddog_sidecar_telemetry_addEndpoint_buffer(
139144
path: Some(path.to_utf8_lossy().into_owned()),
140145
operation_name: operation_name.to_utf8_lossy().into_owned(),
141146
resource_name: resource_name.to_utf8_lossy().into_owned(),
147+
// The API-schema fields added in libdatadog 41 are not collected by the
148+
// PHP endpoint discovery yet; leave them absent from the payload.
149+
request_body_type: None,
150+
response_body_type: None,
151+
response_code: None,
142152
});
143153
buffer.buffer.push(SidecarAction::Telemetry(action));
144154
}
@@ -158,7 +168,11 @@ pub unsafe extern "C" fn ddog_sidecar_telemetry_enqueueConfig_buffer(
158168
};
159169
let action = TelemetryActions::AddConfig(data::Configuration {
160170
name: config_key.to_utf8_lossy().into_owned(),
161-
value: config_value.to_utf8_lossy().into_owned(),
171+
// `value` became `Option<String>` so that libdatadog can distinguish a
172+
// null value from an empty one. The PHP side has no null: every config
173+
// key we enqueue has a (possibly empty) string value, and an empty
174+
// `DD_*` value is meaningful, so it stays `Some("")` rather than `None`.
175+
value: Some(config_value.to_utf8_lossy().into_owned()),
162176
origin,
163177
config_id,
164178
seq_id: None,

0 commit comments

Comments
 (0)