From 1f7f4ca79cf4f4cdc19f5090405bfa32325b71aa Mon Sep 17 00:00:00 2001 From: Louis Tricot Date: Mon, 9 Mar 2026 14:01:23 +0100 Subject: [PATCH 1/5] bump libdatadog --- Cargo.lock | 357 ++++++++++++++++++++++++++--------- components-rs/common.h | 23 ++- components-rs/crashtracker.h | 46 ++++- libdatadog | 2 +- 4 files changed, 325 insertions(+), 103 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7fa7a3447f..e8cfe97231 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -319,7 +319,7 @@ dependencies = [ "addr2line", "cfg-if", "libc 0.2.177", - "miniz_oxide", + "miniz_oxide 0.8.3", "object 0.36.7", "rustc-demangle", "windows-targets 0.52.6", @@ -405,15 +405,15 @@ checksum = "a1d084b0137aaa901caf9f1e8b21daa6aa24d41cd806e111335541eff9683bd6" [[package]] name = "blazesym" -version = "0.2.0-rc.5" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95824d1dd4f20b4a4dfa63b72954e81914a718357231468180b30314e85057fa" +checksum = "48ceccc54b9c3e60e5f36b0498908c8c0f87387229cb0e0e5d65a074e00a8ba4" dependencies = [ - "cpp_demangle", + "cpp_demangle 0.5.1", "gimli 0.32.0", "libc 0.2.177", "memmap2", - "miniz_oxide", + "miniz_oxide 0.9.0", "rustc-demangle", ] @@ -562,9 +562,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.9.0" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "325918d6fe32f23b19878fe4b34794ae41fc19ddbe53b10571a4874d44ffd39b" +checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33" dependencies = [ "serde", ] @@ -951,6 +951,15 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "cpp_demangle" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0667304c32ea56cb4cd6d2d7c0cfe9a2f8041229db8c033af7f8d69492429def" +dependencies = [ + "cfg-if", +] + [[package]] name = "cpu-time" version = "1.0.0" @@ -1025,6 +1034,12 @@ dependencies = [ "itertools 0.10.5", ] +[[package]] +name = "critical-section" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "790eea4361631c5e7d22598ecd5723ff611904e3344ce8720784c93e3d83d40b" + [[package]] name = "crossbeam-channel" version = "0.5.15" @@ -1208,6 +1223,12 @@ dependencies = [ "syn 2.0.96", ] +[[package]] +name = "data-encoding" +version = "2.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7a1e2f27636f116493b8b860f5546edb47c8d8f8ea73e1d2a20be88e28d1fea" + [[package]] name = "datadog-ffe" version = "1.0.0" @@ -1241,7 +1262,7 @@ dependencies = [ "glibc_version", "io-lifetimes", "libc 0.2.177", - "libdd-common 1.1.0", + "libdd-common 2.0.0", "libdd-tinybytes", "memfd", "nix 0.29.0", @@ -1275,14 +1296,15 @@ name = "datadog-live-debugger" version = "0.0.1" dependencies = [ "anyhow", + "bytes", "constcat", + "http", "http-body-util", - "hyper 1.6.0", - "libdd-common 1.1.0", + "libdd-common 2.0.0", "libdd-data-pipeline", "percent-encoding 2.3.1", "regex", - "regex-automata 0.4.9", + "regex-automata", "serde", "serde_json", "smallvec", @@ -1297,7 +1319,7 @@ version = "0.0.1" dependencies = [ "build_common", "datadog-live-debugger", - "libdd-common 1.1.0", + "libdd-common 2.0.0", "libdd-common-ffi", "log 0.4.25", "percent-encoding 2.3.1", @@ -1328,7 +1350,7 @@ dependencies = [ "lazy_static", "libc 0.2.177", "libdd-alloc", - "libdd-common 1.1.0 (git+https://github.com/DataDog/libdatadog?tag=v27.0.0)", + "libdd-common 1.1.0", "libdd-library-config-ffi", "libdd-profiling", "log 0.4.25", @@ -1359,7 +1381,7 @@ dependencies = [ "http-body-util", "hyper 1.6.0", "hyper-util", - "libdd-common 1.1.0", + "libdd-common 2.0.0", "libdd-trace-protobuf", "manual_future", "regex", @@ -1393,9 +1415,8 @@ dependencies = [ "http", "http-body-util", "httpmock", - "hyper 1.6.0", "libc 0.2.177", - "libdd-common 1.1.0", + "libdd-common 2.0.0", "libdd-common-ffi", "libdd-crashtracker", "libdd-crashtracker-ffi", @@ -1440,7 +1461,7 @@ dependencies = [ "datadog-sidecar", "http", "libc 0.2.177", - "libdd-common 1.1.0", + "libdd-common 2.0.0", "libdd-common-ffi", "libdd-crashtracker-ffi", "libdd-dogstatsd-client", @@ -1483,7 +1504,7 @@ dependencies = [ "itertools 0.11.0", "lazy_static", "libc 0.2.177", - "libdd-common 1.1.0", + "libdd-common 2.0.0", "libdd-common-ffi", "libdd-crashtracker-ffi", "libdd-library-config-ffi", @@ -1494,7 +1515,7 @@ dependencies = [ "log 0.4.25", "paste", "regex", - "regex-automata 0.4.9", + "regex-automata", "serde", "serde_json", "serde_with", @@ -1645,6 +1666,18 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "enum-as-inner" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1e6a265c649f3f5979b601d26f1d05ada116434c87741c9493cb56218f76cbc" +dependencies = [ + "heck 0.5.0", + "proc-macro2", + "quote", + "syn 2.0.96", +] + [[package]] name = "enum-ordinalize" version = "3.1.15" @@ -1780,7 +1813,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c936bfdafb507ebbf50b8074c54fa31c5be9a1e7e5f467dd659697041407d07c" dependencies = [ "crc32fast", - "miniz_oxide", + "miniz_oxide 0.8.3", ] [[package]] @@ -2182,6 +2215,52 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +[[package]] +name = "hickory-proto" +version = "0.25.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8a6fe56c0038198998a6f217ca4e7ef3a5e51f46163bd6dd60b5c71ca6c6502" +dependencies = [ + "async-trait", + "cfg-if", + "data-encoding", + "enum-as-inner", + "futures-channel", + "futures-io", + "futures-util", + "idna 1.0.3", + "ipnet", + "once_cell", + "rand 0.9.0", + "ring", + "thiserror 2.0.12", + "tinyvec", + "tokio", + "tracing", + "url 2.5.4", +] + +[[package]] +name = "hickory-resolver" +version = "0.25.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc62a9a99b0bfb44d2ab95a7208ac952d31060efc16241c87eaf36406fecf87a" +dependencies = [ + "cfg-if", + "futures-util", + "hickory-proto", + "ipconfig", + "moka", + "once_cell", + "parking_lot", + "rand 0.9.0", + "resolv-conf", + "smallvec", + "thiserror 2.0.12", + "tokio", + "tracing", +] + [[package]] name = "home" version = "0.5.9" @@ -2600,6 +2679,18 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "ipconfig" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b58db92f96b720de98181bbbe63c831e87005ab460c1bf306eb2622b4707997f" +dependencies = [ + "socket2 0.5.10", + "widestring", + "windows-sys 0.48.0", + "winreg", +] + [[package]] name = "ipnet" version = "2.11.0" @@ -2776,9 +2867,9 @@ dependencies = [ [[package]] name = "libdd-common" version = "1.1.0" +source = "git+https://github.com/DataDog/libdatadog?tag=v27.0.0#72e56a3dcf9189a92db1f177c4c9d844725079f7" dependencies = [ "anyhow", - "bytes", "cc", "const_format", "futures", @@ -2792,11 +2883,9 @@ dependencies = [ "hyper 1.6.0", "hyper-rustls", "hyper-util", - "indexmap 2.12.1", "libc 0.2.177", - "maplit", "mime 0.3.17", - "multer", + "multipart", "nix 0.29.0", "pin-project", "rand 0.8.5", @@ -2806,7 +2895,6 @@ dependencies = [ "rustls-native-certs", "serde", "static_assertions", - "tempfile", "thiserror 1.0.69", "tokio", "tokio-rustls", @@ -2816,10 +2904,10 @@ dependencies = [ [[package]] name = "libdd-common" -version = "1.1.0" -source = "git+https://github.com/DataDog/libdatadog?tag=v27.0.0#72e56a3dcf9189a92db1f177c4c9d844725079f7" +version = "2.0.0" dependencies = [ "anyhow", + "bytes", "cc", "const_format", "futures", @@ -2833,9 +2921,11 @@ dependencies = [ "hyper 1.6.0", "hyper-rustls", "hyper-util", + "indexmap 2.12.1", "libc 0.2.177", + "maplit", "mime 0.3.17", - "multipart", + "multer", "nix 0.29.0", "pin-project", "rand 0.8.5", @@ -2845,6 +2935,7 @@ dependencies = [ "rustls-native-certs", "serde", "static_assertions", + "tempfile", "thiserror 1.0.69", "tokio", "tokio-rustls", @@ -2864,7 +2955,7 @@ dependencies = [ "crossbeam-queue", "function_name", "hyper 1.6.0", - "libdd-common 1.1.0", + "libdd-common 2.0.0", "serde", ] @@ -2883,7 +2974,7 @@ dependencies = [ "goblin", "http", "libc 0.2.177", - "libdd-common 1.1.0", + "libdd-common 2.0.0", "libdd-telemetry", "nix 0.29.0", "num-derive", @@ -2912,7 +3003,7 @@ dependencies = [ "build_common", "function_name", "libc 0.2.177", - "libdd-common 1.1.0", + "libdd-common 2.0.0", "libdd-common-ffi", "libdd-crashtracker", "serde", @@ -2925,7 +3016,7 @@ dependencies = [ [[package]] name = "libdd-data-pipeline" -version = "1.0.0" +version = "2.0.0" dependencies = [ "anyhow", "arc-swap", @@ -2936,9 +3027,7 @@ dependencies = [ "http", "http-body-util", "httpmock", - "hyper 1.6.0", - "hyper-util", - "libdd-common 1.1.0", + "libdd-common 2.0.0", "libdd-ddsketch", "libdd-dogstatsd-client", "libdd-log", @@ -2962,7 +3051,7 @@ dependencies = [ [[package]] name = "libdd-ddsketch" -version = "1.0.0" +version = "1.0.1" dependencies = [ "prost", "prost-build", @@ -2971,12 +3060,12 @@ dependencies = [ [[package]] name = "libdd-dogstatsd-client" -version = "1.0.0" +version = "1.0.1" dependencies = [ "anyhow", "cadence", "http", - "libdd-common 1.1.0", + "libdd-common 2.0.0", "serde", "tokio", "tracing", @@ -2987,12 +3076,16 @@ name = "libdd-library-config" version = "1.0.0" dependencies = [ "anyhow", + "libdd-trace-protobuf", "memfd", + "prost", "rand 0.8.5", "rmp", "rmp-serde", + "rustix 1.1.3", "serde", "serde_yaml", + "serial_test", "tempfile", ] @@ -3003,7 +3096,7 @@ dependencies = [ "anyhow", "build_common", "constcat", - "libdd-common 1.1.0", + "libdd-common 2.0.0", "libdd-common-ffi", "libdd-library-config", "tempfile", @@ -3040,7 +3133,7 @@ dependencies = [ "httparse", "indexmap 2.12.1", "libdd-alloc", - "libdd-common 1.1.0 (git+https://github.com/DataDog/libdatadog?tag=v27.0.0)", + "libdd-common 1.1.0", "libdd-profiling-protobuf", "mime 0.3.17", "parking_lot", @@ -3067,7 +3160,7 @@ dependencies = [ [[package]] name = "libdd-telemetry" -version = "2.0.0" +version = "3.0.0" dependencies = [ "anyhow", "base64 0.22.1", @@ -3075,10 +3168,8 @@ dependencies = [ "hashbrown 0.15.2", "http", "http-body-util", - "hyper 1.6.0", - "hyper-util", "libc 0.2.177", - "libdd-common 1.1.0", + "libdd-common 2.0.0", "libdd-ddsketch", "serde", "serde_json", @@ -3098,7 +3189,7 @@ dependencies = [ "build_common", "function_name", "libc 0.2.177", - "libdd-common 1.1.0", + "libdd-common 2.0.0", "libdd-common-ffi", "libdd-telemetry", "paste", @@ -3121,7 +3212,7 @@ dependencies = [ [[package]] name = "libdd-trace-normalization" -version = "1.0.0" +version = "1.0.1" dependencies = [ "anyhow", "arbitrary", @@ -3133,7 +3224,7 @@ dependencies = [ [[package]] name = "libdd-trace-protobuf" -version = "1.0.0" +version = "1.1.0" dependencies = [ "prost", "prost-build", @@ -3146,7 +3237,7 @@ dependencies = [ [[package]] name = "libdd-trace-stats" -version = "1.0.0" +version = "1.0.1" dependencies = [ "criterion", "hashbrown 0.15.2", @@ -3158,7 +3249,7 @@ dependencies = [ [[package]] name = "libdd-trace-utils" -version = "1.0.0" +version = "2.0.0" dependencies = [ "anyhow", "bolero", @@ -3169,11 +3260,12 @@ dependencies = [ "flate2", "futures", "http", + "http-body", "http-body-util", "httpmock", "hyper 1.6.0", "indexmap 2.12.1", - "libdd-common 1.1.0", + "libdd-common 2.0.0", "libdd-tinybytes", "libdd-trace-normalization", "libdd-trace-protobuf", @@ -3287,11 +3379,11 @@ checksum = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d" [[package]] name = "matchers" -version = "0.1.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" +checksum = "d1525a2a28c7f4fa0fc98bb91ae755d1e2d1505079e05539e35bc876b5d65ae9" dependencies = [ - "regex-automata 0.1.10", + "regex-automata", ] [[package]] @@ -3414,6 +3506,15 @@ name = "miniz_oxide" version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b8402cab7aefae129c6977bb0ff1b8fd9a04eb5b51efc50a70bea51cda0c7924" +dependencies = [ + "adler2", +] + +[[package]] +name = "miniz_oxide" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5faa9f23e86bd5768d76def086192ff5f869fb088da12a976ea21e9796b975f6" dependencies = [ "adler2", "simd-adler32", @@ -3446,6 +3547,23 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "41f5c9112cb662acd3b204077e0de5bc66305fa8df65c8019d5adb10e9ab6e58" +[[package]] +name = "moka" +version = "0.12.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85f8024e1c8e71c778968af91d43700ce1d11b219d127d79fb2934153b82b42b" +dependencies = [ + "crossbeam-channel", + "crossbeam-epoch", + "crossbeam-utils", + "equivalent", + "parking_lot", + "portable-atomic", + "smallvec", + "tagptr", + "uuid", +] + [[package]] name = "msvc-demangler" version = "0.10.1" @@ -3578,12 +3696,11 @@ dependencies = [ [[package]] name = "nu-ansi-term" -version = "0.46.0" +version = "0.50.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" +checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5" dependencies = [ - "overload", - "winapi 0.3.9", + "windows-sys 0.61.2", ] [[package]] @@ -3826,6 +3943,10 @@ name = "once_cell" version = "1.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" +dependencies = [ + "critical-section", + "portable-atomic", +] [[package]] name = "oorandom" @@ -3909,12 +4030,6 @@ dependencies = [ "windows-sys 0.61.2", ] -[[package]] -name = "overload" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" - [[package]] name = "page_size" version = "0.6.0" @@ -4203,7 +4318,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "059a34f111a9dee2ce1ac2826a68b24601c4298cfeb1a587c3cb493d5ab46f52" dependencies = [ "libc 0.2.177", - "nix 0.29.0", + "nix 0.30.1", ] [[package]] @@ -4297,7 +4412,7 @@ dependencies = [ "rand 0.8.5", "rand_chacha 0.3.1", "rand_xorshift 0.3.0", - "regex-syntax 0.8.5", + "regex-syntax", "unarray", ] @@ -4829,17 +4944,8 @@ checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.9", - "regex-syntax 0.8.5", -] - -[[package]] -name = "regex-automata" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" -dependencies = [ - "regex-syntax 0.6.29", + "regex-automata", + "regex-syntax", ] [[package]] @@ -4850,15 +4956,9 @@ checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.5", + "regex-syntax", ] -[[package]] -name = "regex-syntax" -version = "0.6.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" - [[package]] name = "regex-syntax" version = "0.8.5" @@ -4884,6 +4984,7 @@ dependencies = [ "bytes", "futures-core", "futures-util", + "hickory-resolver", "http", "http-body", "http-body-util", @@ -4893,6 +4994,7 @@ dependencies = [ "js-sys", "log 0.4.25", "mime_guess 2.0.5", + "once_cell", "percent-encoding 2.3.1", "pin-project-lite", "quinn", @@ -4911,6 +5013,12 @@ dependencies = [ "web-sys", ] +[[package]] +name = "resolv-conf" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e061d1b48cb8d38042de4ae0a7a6401009d6143dc80d2e2d6f31f0bdd6470c7" + [[package]] name = "ring" version = "0.17.14" @@ -5133,6 +5241,15 @@ dependencies = [ "winapi-util", ] +[[package]] +name = "scc" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46e6f046b7fef48e2660c57ed794263155d713de679057f2d0c169bfc6e756cc" +dependencies = [ + "sdd", +] + [[package]] name = "schannel" version = "0.1.27" @@ -5198,6 +5315,12 @@ dependencies = [ "syn 2.0.96", ] +[[package]] +name = "sdd" +version = "3.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "490dcfcbfef26be6800d11870ff2df8774fa6e86d047e3e8c8a76b25655e41ca" + [[package]] name = "security-framework" version = "3.5.1" @@ -5382,6 +5505,32 @@ dependencies = [ "unsafe-libyaml", ] +[[package]] +name = "serial_test" +version = "3.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "911bd979bf1070a3f3aa7b691a3b3e9968f339ceeec89e08c280a8a22207a32f" +dependencies = [ + "futures-executor", + "futures-util", + "log 0.4.25", + "once_cell", + "parking_lot", + "scc", + "serial_test_derive", +] + +[[package]] +name = "serial_test_derive" +version = "3.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a7d91949b85b0d2fb687445e448b40d322b6b3e4af6b44a29b21d9a5f33e6d9" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.96", +] + [[package]] name = "sha1" version = "0.10.6" @@ -5665,7 +5814,7 @@ version = "12.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "98cf6a95abff97de4d7ff3473f33cacd38f1ddccad5c1feab435d6760300e3b6" dependencies = [ - "cpp_demangle", + "cpp_demangle 0.4.4", "msvc-demangler", "rustc-demangle", "symbolic-common", @@ -5732,6 +5881,12 @@ dependencies = [ "unicode-width", ] +[[package]] +name = "tagptr" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b2093cf4c8eb1e67749a6762251bc9cd836b6fc171623bd0a9d324d37af2417" + [[package]] name = "target-lexicon" version = "0.13.4" @@ -6224,9 +6379,9 @@ checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" -version = "0.1.41" +version = "0.1.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" +checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" dependencies = [ "log 0.4.25", "pin-project-lite", @@ -6248,9 +6403,9 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.28" +version = "0.1.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" +checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da" dependencies = [ "proc-macro2", "quote", @@ -6259,9 +6414,9 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.33" +version = "0.1.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c" +checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" dependencies = [ "once_cell", "valuable", @@ -6303,14 +6458,14 @@ dependencies = [ [[package]] name = "tracing-subscriber" -version = "0.3.19" +version = "0.3.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8189decb5ac0fa7bc8b96b7cb9b2701d60d48805aca84a238004d665fcc4008" +checksum = "2f30143827ddab0d256fd843b7a66d164e9f271cfa0dde49142c5ca0ca291f1e" dependencies = [ "matchers", "nu-ansi-term", "once_cell", - "regex", + "regex-automata", "serde", "serde_json", "sharded-slab", @@ -6759,6 +6914,12 @@ dependencies = [ "rustix 0.38.43", ] +[[package]] +name = "widestring" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72069c3113ab32ab29e5584db3c6ec55d416895e60715417b5b883a357c3e471" + [[package]] name = "winapi" version = "0.2.8" @@ -7244,6 +7405,16 @@ dependencies = [ "memchr", ] +[[package]] +name = "winreg" +version = "0.50.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" +dependencies = [ + "cfg-if", + "windows-sys 0.48.0", +] + [[package]] name = "winver" version = "1.0.0" diff --git a/components-rs/common.h b/components-rs/common.h index e53c4ef311..c042590d5f 100644 --- a/components-rs/common.h +++ b/components-rs/common.h @@ -1388,6 +1388,14 @@ typedef struct ddog_crasht_Slice_CInt { uintptr_t len; } ddog_crasht_Slice_CInt; +/** + * Represents an object that should only be referred to by its handle. + * Do not access its member for any reason, only use the C API functions on this struct. + */ +typedef struct ddog_crasht_Handle_StackTrace { + struct ddog_crasht_StackTrace *inner; +} ddog_crasht_Handle_StackTrace; + /** * A generic result type for when an operation may fail, * or may return in case of success. @@ -1493,14 +1501,6 @@ typedef struct ddog_crasht_Span { ddog_CharSlice thread_name; } ddog_crasht_Span; -/** - * Represents an object that should only be referred to by its handle. - * Do not access its member for any reason, only use the C API functions on this struct. - */ -typedef struct ddog_crasht_Handle_StackTrace { - struct ddog_crasht_StackTrace *inner; -} ddog_crasht_Handle_StackTrace; - typedef struct ddog_crasht_ThreadData { bool crashed; ddog_CharSlice name; @@ -1875,6 +1875,13 @@ void ddog_endpoint_set_timeout(struct ddog_Endpoint *endpoint, uint64_t millis); void ddog_endpoint_set_test_token(struct ddog_Endpoint *endpoint, ddog_CharSlice token); +/** + * Set whether to use the system DNS resolver when building the reqwest client. + * If false, the default in-process resolver is used. + */ +void ddog_endpoint_set_use_system_resolver(struct ddog_Endpoint *endpoint, + bool use_system_resolver); + void ddog_endpoint_drop(struct ddog_Endpoint*); struct ddog_Option_U32 ddog_Option_U32_some(uint32_t v); diff --git a/components-rs/crashtracker.h b/components-rs/crashtracker.h index 69f1e56502..65ab3af974 100644 --- a/components-rs/crashtracker.h +++ b/components-rs/crashtracker.h @@ -131,6 +131,45 @@ struct ddog_VoidResult ddog_crasht_init_without_receiver(struct ddog_crasht_Conf */ struct ddog_crasht_Slice_CInt ddog_crasht_default_signals(void); +/** + * Report an unhandled exception as a crash event. + * + * This function sends a crash report for an unhandled exception detected + * by the runtime. It is intended to be called when the process is in a + * terminal state due to an unhandled exception. + * + * # Parameters + * - `error_type`: Optional type/class of the exception (e.g. "NullPointerException"). Pass empty + * CharSlice for unknown. + * - `error_message`: Optional error message. Pass empty CharSlice for no message. + * - `runtime_stack`: Stack trace from the runtime. Consumed by this call. + * + * If the crash-tracker has not been initialized, this function is a no-op. + * + * # Side effects + * This function disables the signal-based crash handler before performing + * any work. This means that if the process receives a fatal signal (SIGSEGV) + * during or after this call, the crashtracker will not produce a + * second crash report. The previous signal handler (if any) will still be + * chained. + * + * # Failure mode + * If a fatal signal occurs while this function is in progress, the calling + * process is in an unrecoverable state; the crashtracker cannot report the + * secondary fault and the caller's own signal handler (if any) will execute + * in a potentially corrupted context. Callers should treat this function as a + * terminal operation and exit shortly after it returns. + * + * # Safety + * Crash-tracking functions are not reentrant. + * No other crash-handler functions should be called concurrently. + * The `runtime_stack` handle must be valid and will be consumed. + */ +DDOG_CHECK_RETURN +struct ddog_VoidResult ddog_crasht_report_unhandled_exception(ddog_CharSlice error_type, + ddog_CharSlice error_message, + struct ddog_crasht_Handle_StackTrace *runtime_stack); + /** * Removes all existing additional tags * Expected to be used after a fork, to reset the additional tags on the child @@ -661,7 +700,12 @@ struct ddog_VoidResult ddog_crasht_CrashInfoBuilder_with_thread_name(struct ddog * The `builder` can be null, but if non-null it must point to a Builder made by this module, * which has not previously been dropped. * All arguments must be valid. - * This method requires that the builder has a UUID and metadata set + * This method requires that the builder has `metadata` and `kind` set + * Applications can add `message` or `sig_info` to the builder to provide additional context. + * If set, the data will be used to derive the crash ping message in the order of + * - an explicit message set with `with_message` + * - sig_info set with `with_sig_info` + * - kind set with `with_kind` */ DDOG_CHECK_RETURN struct ddog_VoidResult ddog_crasht_CrashInfoBuilder_upload_ping_to_endpoint(struct ddog_crasht_Handle_CrashInfoBuilder *builder, diff --git a/libdatadog b/libdatadog index a0cef26b02..ae9464fe94 160000 --- a/libdatadog +++ b/libdatadog @@ -1 +1 @@ -Subproject commit a0cef26b0240f19dd994d471d5679e8c426adfc8 +Subproject commit ae9464fe941df9d885e27b7dca9cbe75c62eb2a7 From 0d9d364f78b7ffdc32ee137ccaaa5353d385e8d0 Mon Sep 17 00:00:00 2001 From: Louis Tricot Date: Tue, 20 Jan 2026 16:12:38 +0100 Subject: [PATCH 2/5] Adds process tags to remote config payload --- components-rs/ddtrace.h | 3 +- components-rs/remote_config.rs | 2 + ext/process_tags.c | 29 +++++++++++ ext/process_tags.h | 6 +++ ext/sidecar.c | 4 +- tests/ext/remote_config/process_tags.phpt | 62 +++++++++++++++++++++++ 6 files changed, 104 insertions(+), 2 deletions(-) create mode 100644 tests/ext/remote_config/process_tags.phpt diff --git a/components-rs/ddtrace.h b/components-rs/ddtrace.h index c0bab2a9ea..2c888abb79 100644 --- a/components-rs/ddtrace.h +++ b/components-rs/ddtrace.h @@ -80,7 +80,8 @@ bool ddog_remote_configs_service_env_change(struct ddog_RemoteConfigState *remot ddog_CharSlice service, ddog_CharSlice env, ddog_CharSlice version, - const struct ddog_Vec_Tag *tags); + const struct ddog_Vec_Tag *tags, + const struct ddog_Vec_Tag *process_tags); bool ddog_remote_config_alter_dynamic_config(struct ddog_RemoteConfigState *remote_config, ddog_CharSlice config, diff --git a/components-rs/remote_config.rs b/components-rs/remote_config.rs index 75e97b019d..f72779abe9 100644 --- a/components-rs/remote_config.rs +++ b/components-rs/remote_config.rs @@ -494,12 +494,14 @@ pub extern "C" fn ddog_remote_configs_service_env_change( env: CharSlice, version: CharSlice, tags: &libdd_common_ffi::Vec, + process_tags: &libdd_common_ffi::Vec, ) -> bool { let new_target = Target { service: service.to_utf8_lossy().to_string(), env: env.to_utf8_lossy().to_string(), app_version: version.to_utf8_lossy().to_string(), tags: tags.as_slice().to_vec(), + process_tags: process_tags.as_slice().to_vec(), }; if let Some(target) = remote_config.manager.get_target() { diff --git a/ext/process_tags.c b/ext/process_tags.c index 9c6a06a7ec..0b2301aa25 100644 --- a/ext/process_tags.c +++ b/ext/process_tags.c @@ -32,6 +32,7 @@ typedef struct { size_t count; size_t capacity; zend_string *serialized; + ddog_Vec_Tag vec; } process_tags_t; static process_tags_t process_tags = {0}; @@ -190,12 +191,35 @@ static void serialize_process_tags(void) { } smart_str_free(&buf); + + process_tags.vec = ddog_Vec_Tag_new(); + for (size_t i = 0; i < process_tags.count; i++) { + const char* key = process_tags.tag_list[i].key; + const char* value = process_tags.tag_list[i].value; + + UNUSED(ddog_Vec_Tag_push(&process_tags.vec, + (ddog_CharSlice) {.ptr = key, .len = strlen(key)}, + (ddog_CharSlice) {.ptr = value, .len = strlen(value)} + )); + } } zend_string *ddtrace_process_tags_get_serialized(void) { return (ddtrace_process_tags_enabled() && process_tags.serialized) ? process_tags.serialized : ZSTR_EMPTY_ALLOC(); } +const ddog_Vec_Tag *ddtrace_process_tags_get_vec(void) { + if (ddtrace_process_tags_enabled()) { + return &process_tags.vec; + } + + static ddog_Vec_Tag empty_vec; + if (!empty_vec.ptr) { + empty_vec = ddog_Vec_Tag_new(); + } + return &empty_vec; +} + bool ddtrace_process_tags_enabled(void){ return get_global_DD_EXPERIMENTAL_PROPAGATE_PROCESS_TAGS_ENABLED(); } @@ -224,5 +248,10 @@ void ddtrace_process_tags_mshutdown(void) { if (process_tags.serialized) { zend_string_release(process_tags.serialized); } + + if (process_tags.vec.ptr) { + ddog_Vec_Tag_drop(process_tags.vec); + } + memset(&process_tags, 0, sizeof(process_tags)); } diff --git a/ext/process_tags.h b/ext/process_tags.h index 65377e113d..d205267501 100644 --- a/ext/process_tags.h +++ b/ext/process_tags.h @@ -4,6 +4,8 @@ #include #include "Zend/zend_types.h" #include "ddtrace_export.h" +#include "components-rs/common.h" + // Called at first RINIT to collect process tags void ddtrace_process_tags_first_rinit(void); @@ -18,4 +20,8 @@ bool ddtrace_process_tags_enabled(void); // Returns NULL if disabled or not yet collected DDTRACE_PUBLIC zend_string *ddtrace_process_tags_get_serialized(void); +// Get a pointer to the process tags Vec +// Returns a pointer to an empty Vec if disabled or not yet collected +const ddog_Vec_Tag *ddtrace_process_tags_get_vec(void); + #endif // DD_PROCESS_TAGS_H diff --git a/ext/sidecar.c b/ext/sidecar.c index 73b653fd7c..d12c77efd4 100644 --- a/ext/sidecar.c +++ b/ext/sidecar.c @@ -528,9 +528,11 @@ void ddtrace_sidecar_submit_root_span_data_direct(ddog_SidecarTransport **transp } ddog_CharSlice version_slice = dd_zend_string_to_CharSlice(version_string); + const ddog_Vec_Tag *process_tags = ddtrace_process_tags_get_vec(); + bool changed = true; if (DDTRACE_G(remote_config_state)) { - changed = ddog_remote_configs_service_env_change(DDTRACE_G(remote_config_state), service_slice, env_slice, version_slice, &DDTRACE_G(active_global_tags)); + changed = ddog_remote_configs_service_env_change(DDTRACE_G(remote_config_state), service_slice, env_slice, version_slice, &DDTRACE_G(active_global_tags), process_tags); if (!changed && root) { // ddog_remote_configs_service_env_change() generally only processes configs if they changed. However, upon request initialization it may be identical to the previous request. // However, at request shutdown some configs are unloaded. Explicitly forcing a processing step ensures these are re-loaded. diff --git a/tests/ext/remote_config/process_tags.phpt b/tests/ext/remote_config/process_tags.phpt new file mode 100644 index 0000000000..7b84352307 --- /dev/null +++ b/tests/ext/remote_config/process_tags.phpt @@ -0,0 +1,62 @@ +--TEST-- +Test remote config request payload +--SKIPIF-- + +--ENV-- +DD_AGENT_HOST=request-replayer +DD_TRACE_AGENT_PORT=80 +DD_TRACE_GENERATE_ROOT_SPAN=0 +DD_REMOTE_CONFIG_POLL_INTERVAL_SECONDS=0.01 +DD_EXPERIMENTAL_PROPAGATE_PROCESS_TAGS_ENABLED=1 +--INI-- +datadog.trace.agent_test_session_token=remote-config/check_payload +--FILE-- + true, +]); + +try { + $request = $rr->waitForRequest(function($req) { + return strpos($req["uri"], '/v0.7/config') !== false; + }); + $body = json_decode($request["body"], true); +} catch (Exception $e) { + echo "ERROR: No RC request found\n"; + exit(1); +} + +if (!isset($body["client"]["client_tracer"]["process_tags"])) { + echo "ERROR: Missing 'process_tags' field\n"; + exit(1); +} + +$process_tags = $body["client"]["client_tracer"]["process_tags"]; +foreach ($process_tags as $tag) { + echo $tag . PHP_EOL; +} + +del_rc_file($path); + +?> +--CLEAN-- + +--EXPECTF-- +entrypoint.basedir:remote_config +entrypoint.name:process_tags +entrypoint.type:script +entrypoint.workdir:%s +runtime.sapi:cli From dcc0a9c946c5f5611db5e49d236edb41b396ac4e Mon Sep 17 00:00:00 2001 From: Louis Tricot Date: Fri, 6 Mar 2026 14:48:20 +0100 Subject: [PATCH 3/5] fix tests --- ext/process_tags.c | 2 +- tests/ext/crashtracker_segfault.phpt | 2 +- tests/ext/includes/request_replayer.inc | 29 +++++++++++++++++++ .../debugger_span_decoration_probe.phpt | 2 +- tests/ext/remote_config/process_tags.phpt | 10 +++++-- 5 files changed, 40 insertions(+), 5 deletions(-) diff --git a/ext/process_tags.c b/ext/process_tags.c index 0b2301aa25..76d0b51cba 100644 --- a/ext/process_tags.c +++ b/ext/process_tags.c @@ -209,7 +209,7 @@ zend_string *ddtrace_process_tags_get_serialized(void) { } const ddog_Vec_Tag *ddtrace_process_tags_get_vec(void) { - if (ddtrace_process_tags_enabled()) { + if (ddtrace_process_tags_enabled() && process_tags.vec.ptr) { return &process_tags.vec; } diff --git a/tests/ext/crashtracker_segfault.phpt b/tests/ext/crashtracker_segfault.phpt index 8101393693..3388f138fc 100644 --- a/tests/ext/crashtracker_segfault.phpt +++ b/tests/ext/crashtracker_segfault.phpt @@ -51,7 +51,7 @@ $rr->waitForRequest(function ($request) { if (!isset($payload["message"]["metadata"])) { break; } - if (($payload["message"]["kind"] ?? "") == "Crash ping") { + if (($payload["is_crash"] ?? false) !== true) { continue; } diff --git a/tests/ext/includes/request_replayer.inc b/tests/ext/includes/request_replayer.inc index 0e0d811336..a8fc12f241 100644 --- a/tests/ext/includes/request_replayer.inc +++ b/tests/ext/includes/request_replayer.inc @@ -72,6 +72,26 @@ class RequestReplayer } while (true); } + public function waitForRcRequest($matcher) + { + $i = 0; + do { + if ($i++ == $this->maxIteration) { + throw new Exception("wait for replay timeout"); + } + usleep($this->flushInterval); + + $requests = $this->replayAllRcRequests(); + if (is_array($requests)) { + foreach ($requests as $request) { + if ($matcher($request)) { + return $request; + } + } + } + } while (true); + } + public function waitForDataAndReplay($ignoreTelemetry = true) { $i = 0; @@ -104,6 +124,15 @@ class RequestReplayer ])), true); } + public function replayAllRcRequests() + { + return json_decode(file_get_contents($this->endpoint . '/replay-rc-requests', false, stream_context_create([ + "http" => [ + "header" => "X-Datadog-Test-Session-Token: " . ini_get("datadog.trace.agent_test_session_token"), + ], + ])), true); + } + public function clearDumpedData() { file_get_contents($this->endpoint . '/clear-dumped-data', false, stream_context_create([ diff --git a/tests/ext/live-debugger/debugger_span_decoration_probe.phpt b/tests/ext/live-debugger/debugger_span_decoration_probe.phpt index 9716393f6d..e325910d42 100644 --- a/tests/ext/live-debugger/debugger_span_decoration_probe.phpt +++ b/tests/ext/live-debugger/debugger_span_decoration_probe.phpt @@ -98,7 +98,7 @@ array(2) { ["_dd.di.ret.probe_id"]=> string(1) "3" } -string(%d) "/debugger/v1/input?ddtags=debugger_version:1.%s,env:none,version:,runtime_id:%s-%s-%s-%s-%s,host_name:%s" +string(%d) "/debugger/v1/diagnostics?ddtags=debugger_version:1.%s,env:none,version:,runtime_id:%s-%s-%s-%s-%s,host_name:%s" array(1) { [0]=> array(6) { diff --git a/tests/ext/remote_config/process_tags.phpt b/tests/ext/remote_config/process_tags.phpt index 7b84352307..d69acee40b 100644 --- a/tests/ext/remote_config/process_tags.phpt +++ b/tests/ext/remote_config/process_tags.phpt @@ -27,8 +27,14 @@ $path = put_dynamic_config_file([ ]); try { - $request = $rr->waitForRequest(function($req) { - return strpos($req["uri"], '/v0.7/config') !== false; + $request = $rr->waitForRcRequest(function($req) { + if (strpos($req["uri"], '/v0.7/config') === false) { + return false; + } + + $body = json_decode($req["body"], true); + return isset($body["client"]["client_tracer"]["process_tags"]) + && !empty($body["client"]["client_tracer"]["process_tags"]); }); $body = json_decode($request["body"], true); } catch (Exception $e) { From e2427609e4bb5f663cc505cb9b4928ca16dd7fd9 Mon Sep 17 00:00:00 2001 From: Louis Tricot Date: Mon, 9 Mar 2026 14:40:44 +0100 Subject: [PATCH 4/5] fix attempt 2 --- tests/ext/telemetry/process_tags.phpt | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/tests/ext/telemetry/process_tags.phpt b/tests/ext/telemetry/process_tags.phpt index eaf742e04b..4d640a374e 100644 --- a/tests/ext/telemetry/process_tags.phpt +++ b/tests/ext/telemetry/process_tags.phpt @@ -33,8 +33,16 @@ for ($i = 0; $i < 300; ++$i) { foreach (file(__DIR__ . '/process-tags-telemetry.out') as $l) { if ($l) { $json = json_decode($l, true); - var_dump($json["application"]["process_tags"]); - break 2; + if (!is_array($json)) { + continue; + } + $batch = (isset($json["request_type"]) && $json["request_type"] == "message-batch") ? $json["payload"] : [$json]; + foreach ($batch as $entry) { + if (isset($entry["application"]["process_tags"])) { + var_dump($entry["application"]["process_tags"]); + break 3; + } + } } } } From f662998763448850ca95b746412dca42b7eea899 Mon Sep 17 00:00:00 2001 From: Louis Tricot Date: Mon, 9 Mar 2026 14:53:51 +0100 Subject: [PATCH 5/5] fix attempt 2 --- tests/ext/telemetry/process_tags.phpt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/ext/telemetry/process_tags.phpt b/tests/ext/telemetry/process_tags.phpt index 4d640a374e..d39f6b9902 100644 --- a/tests/ext/telemetry/process_tags.phpt +++ b/tests/ext/telemetry/process_tags.phpt @@ -27,7 +27,7 @@ dd_trace_serialize_closed_spans(); dd_trace_internal_fn("finalize_telemetry"); -for ($i = 0; $i < 300; ++$i) { +for ($i = 0; $i < 600; ++$i) { usleep(100000); if (file_exists(__DIR__ . '/process-tags-telemetry.out')) { foreach (file(__DIR__ . '/process-tags-telemetry.out') as $l) {