diff --git a/.gitlab/generate-package.php b/.gitlab/generate-package.php index a86a813b30f..ed4739f205d 100644 --- a/.gitlab/generate-package.php +++ b/.gitlab/generate-package.php @@ -1433,7 +1433,7 @@ image: registry.ddbuild.io/ci/libdatadog-build/ci_docker_base:67145216 tags: [ "arch:amd64", "size:large" ] rules: - - if: $CI_PIPELINE_SOURCE == "schedule" && $NIGHTLY + - if: $CI_PIPELINE_SOURCE == "schedule" && $NIGHTLY_BUILD when: on_success - if: $CI_COMMIT_REF_NAME =~ /^ddtrace-/ when: on_success diff --git a/.gitlab/generate-tracer.php b/.gitlab/generate-tracer.php index 64eab5f55fa..693edb6589e 100644 --- a/.gitlab/generate-tracer.php +++ b/.gitlab/generate-tracer.php @@ -140,17 +140,17 @@ function before_script_steps($with_docker_auth = false) { docker exec ${CONTAINER_NAME} powershell.exe "cd app; switch-php nts; C:\php\SDK\phpize.bat; .\configure.bat --enable-debug-pack; nmake" # Set test environment variables - docker exec ${CONTAINER_NAME} powershell.exe "setx DD_AUTOLOAD_NO_COMPILE true; setx DATADOG_HAVE_DEV_ENV 1; setx DD_TRACE_GIT_METADATA_ENABLED 0" + docker exec ${CONTAINER_NAME} powershell.exe "setx DD_AUTOLOAD_NO_COMPILE true; setx DATADOG_HAVE_DEV_ENV 1; setx DD_TRACE_GIT_METADATA_ENABLED 0; setx DD_EXPERIMENTAL_PROPAGATE_PROCESS_TAGS_ENABLED 0" # Run extension tests docker exec ${CONTAINER_NAME} powershell.exe 'cd app; $env:_DD_DEBUG_SIDECAR_LOG_LEVEL=trace; $env:_DD_DEBUG_SIDECAR_LOG_METHOD="""file://${pwd}\sidecar.log"""; C:\php\php.exe -n -d memory_limit=-1 -d output_buffering=0 run-tests.php -g FAIL,XFAIL,BORK,WARN,LEAK,XLEAK,SKIP --show-diff -p C:\php\php.exe -d "extension=${pwd}\x64\Release\php_ddtrace.dll" "${pwd}\tests\ext"' - - # Try to stop the container, don't care if we fail - try { docker stop -t 5 ${CONTAINER_NAME} } catch { } after_script: - | docker exec ${CONTAINER_NAME} cmd.exe /s /c xcopy /y /c /s /e C:\ProgramData\Microsoft\Windows\WER\ReportQueue .\app\dumps\ exit 0 + - | + # Try to stop the container, don't care if we fail + try { docker stop -t 5 ${CONTAINER_NAME} } catch { } - 'powershell -NoProfile -Command "try { docker logs request-replayer } catch {}"' - 'powershell -NoProfile -Command "try { docker logs httpbin-integration } catch {}"' - 'powershell -NoProfile -Command "try { docker stop -t 15 request-replayer } catch {}"' diff --git a/Cargo.lock b/Cargo.lock index 6048a3be0ea..c013e8b642f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -153,18 +153,6 @@ dependencies = [ "serde_json", ] -[[package]] -name = "assert-type-eq" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd49a41856ee21a0cfb2b1cfbfcca0f1d3e6c257c38939f0d6ecfaf177f2ea47" - -[[package]] -name = "assert_matches" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9" - [[package]] name = "assert_no_alloc" version = "1.1.2" @@ -506,17 +494,7 @@ dependencies = [ [[package]] name = "build_common" -version = "28.0.3" -dependencies = [ - "cbindgen 0.29.0", - "serde", - "serde_json", -] - -[[package]] -name = "build_common" -version = "28.0.3" -source = "git+https://github.com/DataDog/libdatadog?tag=v28.0.3#29b010af2f7556b6beb29d1b89ed54ce6ff86e1f" +version = "0.0.1" dependencies = [ "cbindgen 0.29.0", "serde", @@ -607,7 +585,7 @@ dependencies = [ "serde_json", "syn 2.0.96", "tempfile", - "toml 0.8.19", + "toml", ] [[package]] @@ -626,7 +604,7 @@ dependencies = [ "serde_json", "syn 2.0.96", "tempfile", - "toml 0.8.19", + "toml", ] [[package]] @@ -1215,7 +1193,7 @@ name = "datadog-ipc" version = "0.1.0" dependencies = [ "anyhow", - "bytes", + "bincode", "criterion", "datadog-ipc-macros", "futures", @@ -1227,16 +1205,12 @@ dependencies = [ "memfd", "nix 0.29.0", "page_size", - "pin-project", "pretty_assertions", "sendfd", "serde", "spawn_worker", - "tarpc", "tempfile", "tokio", - "tokio-serde", - "tokio-util", "tracing", "tracing-subscriber", "winapi 0.3.9", @@ -1247,6 +1221,8 @@ dependencies = [ name = "datadog-ipc-macros" version = "0.0.1" dependencies = [ + "heck 0.5.0", + "proc-macro2", "quote", "syn 2.0.96", ] @@ -1277,10 +1253,10 @@ dependencies = [ name = "datadog-live-debugger-ffi" version = "0.0.1" dependencies = [ - "build_common 28.0.3", + "build_common", "datadog-live-debugger", "libdd-common 3.0.0", - "libdd-common-ffi 28.0.3", + "libdd-common-ffi", "log", "percent-encoding", "serde_json", @@ -1311,7 +1287,7 @@ dependencies = [ "libc 0.2.177", "libdd-alloc", "libdd-common 2.0.0", - "libdd-library-config-ffi 0.0.2 (git+https://github.com/DataDog/libdatadog?tag=v28.0.3)", + "libdd-library-config-ffi", "libdd-profiling", "log", "mach2", @@ -1343,7 +1319,7 @@ dependencies = [ "hyper", "hyper-util", "libdd-common 3.0.0", - "libdd-trace-protobuf 2.0.0", + "libdd-trace-protobuf", "manual_future", "regex", "serde", @@ -1378,7 +1354,7 @@ dependencies = [ "httpmock", "libc 0.2.177", "libdd-common 3.0.0", - "libdd-common-ffi 28.0.3", + "libdd-common-ffi", "libdd-crashtracker", "libdd-crashtracker-ffi", "libdd-data-pipeline", @@ -1423,7 +1399,7 @@ dependencies = [ "http", "libc 0.2.177", "libdd-common 3.0.0", - "libdd-common-ffi 28.0.3", + "libdd-common-ffi", "libdd-crashtracker-ffi", "libdd-dogstatsd-client", "libdd-telemetry", @@ -1466,9 +1442,9 @@ dependencies = [ "lazy_static", "libc 0.2.177", "libdd-common 3.0.0", - "libdd-common-ffi 28.0.3", + "libdd-common-ffi", "libdd-crashtracker-ffi", - "libdd-library-config-ffi 0.0.2", + "libdd-library-config-ffi", "libdd-telemetry", "libdd-telemetry-ffi", "libdd-tinybytes", @@ -1600,18 +1576,6 @@ version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125" -[[package]] -name = "educe" -version = "0.4.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f0042ff8246a363dbe77d2ceedb073339e85a804b9a47636c6e016a9a32c05f" -dependencies = [ - "enum-ordinalize", - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "either" version = "1.13.0" @@ -1639,19 +1603,6 @@ dependencies = [ "syn 2.0.96", ] -[[package]] -name = "enum-ordinalize" -version = "3.1.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bf1fa3f06bbff1ea5b1a9c7b14aa992a39657db60a2759457328d7e058f49ee" -dependencies = [ - "num-bigint", - "num-traits", - "proc-macro2", - "quote", - "syn 2.0.96", -] - [[package]] name = "env_filter" version = "0.1.3" @@ -1911,22 +1862,6 @@ version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" -[[package]] -name = "futures-test" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5961fb6311645f46e2cdc2964a8bfae6743fd72315eaec181a71ae3eb2467113" -dependencies = [ - "futures-core", - "futures-executor", - "futures-io", - "futures-macro", - "futures-sink", - "futures-task", - "futures-util", - "pin-project", -] - [[package]] name = "futures-timer" version = "3.0.3" @@ -2333,11 +2268,10 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.27.5" +version = "0.27.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d191583f3da1305256f22463b9bb0471acad48a4e534a5218b9963e9c1f59b2" +checksum = "e3c93eb611681b207e1fe55d5a71ecf91572ec8a6705cdb6857f7d8d5242cf58" dependencies = [ - "futures-util", "http", "hyper", "hyper-util", @@ -2587,12 +2521,6 @@ dependencies = [ "rustversion", ] -[[package]] -name = "integer-encoding" -version = "3.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bb03732005da905c88227371639bf1ad885cc712789c011c31c5fb3ab3ccf02" - [[package]] name = "io-lifetimes" version = "1.0.11" @@ -2760,7 +2688,7 @@ checksum = "2874a2af47a2325c2001a6e6fad9b16a53b802102b528163885171cf92b15976" [[package]] name = "libdd-alloc" version = "1.0.0" -source = "git+https://github.com/DataDog/libdatadog?tag=v28.0.3#29b010af2f7556b6beb29d1b89ed54ce6ff86e1f" +source = "git+https://github.com/DataDog/libdatadog?tag=v29.0.0#001bd56fcbba34fa4ec3f9798a6c4fbcddeffa40" dependencies = [ "allocator-api2", "libc 0.2.177", @@ -2770,7 +2698,7 @@ dependencies = [ [[package]] name = "libdd-common" version = "2.0.0" -source = "git+https://github.com/DataDog/libdatadog?tag=v28.0.3#29b010af2f7556b6beb29d1b89ed54ce6ff86e1f" +source = "git+https://github.com/DataDog/libdatadog?tag=v29.0.0#001bd56fcbba34fa4ec3f9798a6c4fbcddeffa40" dependencies = [ "anyhow", "bytes", @@ -2850,12 +2778,12 @@ dependencies = [ [[package]] name = "libdd-common-ffi" -version = "28.0.3" +version = "0.0.1" dependencies = [ "anyhow", "assert_no_alloc", "bolero", - "build_common 28.0.3", + "build_common", "chrono", "crossbeam-queue", "function_name", @@ -2864,20 +2792,6 @@ dependencies = [ "serde", ] -[[package]] -name = "libdd-common-ffi" -version = "28.0.3" -source = "git+https://github.com/DataDog/libdatadog?tag=v28.0.3#29b010af2f7556b6beb29d1b89ed54ce6ff86e1f" -dependencies = [ - "anyhow", - "build_common 28.0.3 (git+https://github.com/DataDog/libdatadog?tag=v28.0.3)", - "chrono", - "crossbeam-queue", - "hyper", - "libdd-common 2.0.0", - "serde", -] - [[package]] name = "libdd-crashtracker" version = "1.0.0" @@ -2889,6 +2803,7 @@ dependencies = [ "criterion", "cxx", "cxx-build", + "errno", "goblin", "http", "libc 0.2.177", @@ -2916,14 +2831,14 @@ dependencies = [ [[package]] name = "libdd-crashtracker-ffi" -version = "28.0.3" +version = "0.0.1" dependencies = [ "anyhow", - "build_common 28.0.3", + "build_common", "function_name", "libc 0.2.177", "libdd-common 3.0.0", - "libdd-common-ffi 28.0.3", + "libdd-common-ffi", "libdd-crashtracker", "serde", "serde_json", @@ -2952,7 +2867,7 @@ dependencies = [ "libdd-log", "libdd-telemetry", "libdd-tinybytes", - "libdd-trace-protobuf 2.0.0", + "libdd-trace-protobuf", "libdd-trace-stats", "libdd-trace-utils", "rand 0.8.5", @@ -2990,29 +2905,12 @@ dependencies = [ "tracing", ] -[[package]] -name = "libdd-library-config" -version = "1.0.0" -source = "git+https://github.com/DataDog/libdatadog?tag=v28.0.3#29b010af2f7556b6beb29d1b89ed54ce6ff86e1f" -dependencies = [ - "anyhow", - "libdd-trace-protobuf 1.1.0", - "memfd", - "prost", - "rand 0.8.5", - "rmp", - "rmp-serde", - "rustix 1.1.3", - "serde", - "serde_yaml", -] - [[package]] name = "libdd-library-config" version = "1.1.0" dependencies = [ "anyhow", - "libdd-trace-protobuf 2.0.0", + "libdd-trace-protobuf", "memfd", "prost", "rand 0.8.5", @@ -3030,27 +2928,14 @@ name = "libdd-library-config-ffi" version = "0.0.2" dependencies = [ "anyhow", - "build_common 28.0.3", + "build_common", "constcat", "libdd-common 3.0.0", - "libdd-common-ffi 28.0.3", - "libdd-library-config 1.1.0", + "libdd-common-ffi", + "libdd-library-config", "tempfile", ] -[[package]] -name = "libdd-library-config-ffi" -version = "0.0.2" -source = "git+https://github.com/DataDog/libdatadog?tag=v28.0.3#29b010af2f7556b6beb29d1b89ed54ce6ff86e1f" -dependencies = [ - "anyhow", - "build_common 28.0.3 (git+https://github.com/DataDog/libdatadog?tag=v28.0.3)", - "constcat", - "libdd-common 2.0.0", - "libdd-common-ffi 28.0.3 (git+https://github.com/DataDog/libdatadog?tag=v28.0.3)", - "libdd-library-config 1.0.0", -] - [[package]] name = "libdd-libunwind-sys" version = "0.1.0" @@ -3074,7 +2959,7 @@ dependencies = [ [[package]] name = "libdd-profiling" version = "1.0.0" -source = "git+https://github.com/DataDog/libdatadog?tag=v28.0.3#29b010af2f7556b6beb29d1b89ed54ce6ff86e1f" +source = "git+https://github.com/DataDog/libdatadog?tag=v29.0.0#001bd56fcbba34fa4ec3f9798a6c4fbcddeffa40" dependencies = [ "allocator-api2", "anyhow", @@ -3103,7 +2988,7 @@ dependencies = [ "rustls-platform-verifier", "serde", "serde_json", - "target-triple 0.1.4", + "target-triple", "thiserror 2.0.12", "tokio", "tokio-util", @@ -3113,7 +2998,7 @@ dependencies = [ [[package]] name = "libdd-profiling-protobuf" version = "1.0.0" -source = "git+https://github.com/DataDog/libdatadog?tag=v28.0.3#29b010af2f7556b6beb29d1b89ed54ce6ff86e1f" +source = "git+https://github.com/DataDog/libdatadog?tag=v29.0.0#001bd56fcbba34fa4ec3f9798a6c4fbcddeffa40" dependencies = [ "prost", ] @@ -3144,13 +3029,13 @@ dependencies = [ [[package]] name = "libdd-telemetry-ffi" -version = "28.0.3" +version = "0.0.1" dependencies = [ - "build_common 28.0.3", + "build_common", "function_name", "libc 0.2.177", "libdd-common 3.0.0", - "libdd-common-ffi 28.0.3", + "libdd-common-ffi", "libdd-telemetry", "paste", "tempfile", @@ -3178,20 +3063,10 @@ dependencies = [ "arbitrary", "criterion", "duplicate", - "libdd-trace-protobuf 2.0.0", + "libdd-trace-protobuf", "rand 0.8.5", ] -[[package]] -name = "libdd-trace-protobuf" -version = "1.1.0" -source = "git+https://github.com/DataDog/libdatadog?tag=v28.0.3#29b010af2f7556b6beb29d1b89ed54ce6ff86e1f" -dependencies = [ - "prost", - "serde", - "serde_bytes", -] - [[package]] name = "libdd-trace-protobuf" version = "2.0.0" @@ -3212,7 +3087,7 @@ dependencies = [ "criterion", "hashbrown 0.15.2", "libdd-ddsketch", - "libdd-trace-protobuf 2.0.0", + "libdd-trace-protobuf", "libdd-trace-utils", "rand 0.8.5", ] @@ -3238,7 +3113,7 @@ dependencies = [ "libdd-common 3.0.0", "libdd-tinybytes", "libdd-trace-normalization", - "libdd-trace-protobuf 2.0.0", + "libdd-trace-protobuf", "libdd-trace-utils", "prost", "rand 0.8.5", @@ -3587,16 +3462,6 @@ dependencies = [ "windows-sys 0.61.2", ] -[[package]] -name = "num-bigint" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" -dependencies = [ - "num-integer", - "num-traits", -] - [[package]] name = "num-conv" version = "0.1.0" @@ -3614,15 +3479,6 @@ dependencies = [ "syn 2.0.96", ] -[[package]] -name = "num-integer" -version = "0.1.46" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" -dependencies = [ - "num-traits", -] - [[package]] name = "num-traits" version = "0.2.19" @@ -3633,16 +3489,6 @@ dependencies = [ "libm", ] -[[package]] -name = "num_cpus" -version = "1.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" -dependencies = [ - "hermit-abi 0.3.9", - "libc 0.2.177", -] - [[package]] name = "objc2" version = "0.6.3" @@ -3844,60 +3690,6 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" -[[package]] -name = "opentelemetry" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6105e89802af13fdf48c49d7646d3b533a70e536d818aae7e78ba0433d01acb8" -dependencies = [ - "async-trait", - "crossbeam-channel", - "futures-channel", - "futures-executor", - "futures-util", - "js-sys", - "lazy_static", - "percent-encoding", - "pin-project", - "rand 0.8.5", - "thiserror 1.0.69", - "tokio", - "tokio-stream", -] - -[[package]] -name = "opentelemetry-jaeger" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8c0b12cd9e3f9b35b52f6e0dac66866c519b26f424f4bbf96e3fe8bfbdc5229" -dependencies = [ - "async-trait", - "lazy_static", - "opentelemetry", - "opentelemetry-semantic-conventions", - "thiserror 1.0.69", - "thrift", - "tokio", -] - -[[package]] -name = "opentelemetry-semantic-conventions" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "985cc35d832d412224b2cffe2f9194b1b89b6aa5d0bef76d080dce09d90e62bd" -dependencies = [ - "opentelemetry", -] - -[[package]] -name = "ordered-float" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3305af35278dd29f46fcdd139e0b1fbfae2153f0e5928b39b035542dd31e37b7" -dependencies = [ - "num-traits", -] - [[package]] name = "os_info" version = "3.14.0" @@ -4868,9 +4660,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.36" +version = "0.23.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c665f33d38cea657d9614f766881e4d510e0eda4239891eea56b4cadcf01801b" +checksum = "758025cb5fccfd3bc2fd74708fd4682be41d99e5dff73c377c0646c6012c73a4" dependencies = [ "aws-lc-rs", "once_cell", @@ -5207,15 +4999,6 @@ dependencies = [ "serde", ] -[[package]] -name = "serde_spanned" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8bbf91e5a4d6315eee45e704372590b30e260ee83af6639d64557f51b067776" -dependencies = [ - "serde_core", -] - [[package]] name = "serde_with" version = "3.12.0" @@ -5647,57 +5430,6 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1ac9aa371f599d22256307c24a9d748c041e548cbf599f35d890f9d365361790" -[[package]] -name = "target-triple" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "591ef38edfb78ca4771ee32cf494cb8771944bee237a9b91fc9c1424ac4b777b" - -[[package]] -name = "tarpc" -version = "0.31.0" -dependencies = [ - "anyhow", - "assert_matches", - "bincode", - "bytes", - "flate2", - "fnv", - "futures", - "futures-test", - "humantime", - "opentelemetry", - "opentelemetry-jaeger", - "pin-project", - "pin-utils", - "rand 0.8.5", - "serde", - "serde_bytes", - "static_assertions", - "tarpc-plugins", - "thiserror 1.0.69", - "tokio", - "tokio-serde", - "tokio-util", - "tracing", - "tracing-opentelemetry", - "tracing-subscriber", - "trybuild", -] - -[[package]] -name = "tarpc-plugins" -version = "0.12.0" -dependencies = [ - "assert-type-eq", - "futures", - "proc-macro2", - "quote", - "serde", - "syn 1.0.109", - "tarpc", -] - [[package]] name = "tempdir" version = "0.3.7" @@ -5802,28 +5534,6 @@ dependencies = [ "once_cell", ] -[[package]] -name = "threadpool" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d050e60b33d41c19108b32cea32164033a9013fe3b46cbd4457559bfbf77afaa" -dependencies = [ - "num_cpus", -] - -[[package]] -name = "thrift" -version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b82ca8f46f95b3ce96081fe3dd89160fdea970c254bb72925255d1b62aae692e" -dependencies = [ - "byteorder", - "integer-encoding", - "log", - "ordered-float", - "threadpool", -] - [[package]] name = "time" version = "0.3.37" @@ -5930,22 +5640,6 @@ dependencies = [ "tokio", ] -[[package]] -name = "tokio-serde" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "911a61637386b789af998ee23f50aa30d5fd7edcec8d6d3dedae5e5815205466" -dependencies = [ - "bincode", - "bytes", - "educe", - "futures-core", - "futures-sink", - "pin-project", - "serde", - "serde_json", -] - [[package]] name = "tokio-stream" version = "0.1.17" @@ -5969,7 +5663,6 @@ dependencies = [ "futures-util", "hashbrown 0.14.5", "pin-project-lite", - "slab", "tokio", ] @@ -5980,26 +5673,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e" dependencies = [ "serde", - "serde_spanned 0.6.8", - "toml_datetime 0.6.8", + "serde_spanned", + "toml_datetime", "toml_edit 0.22.22", ] -[[package]] -name = "toml" -version = "1.0.6+spec-1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "399b1124a3c9e16766831c6bba21e50192572cdd98706ea114f9502509686ffc" -dependencies = [ - "indexmap 2.12.1", - "serde_core", - "serde_spanned 1.0.4", - "toml_datetime 1.0.0+spec-1.1.0", - "toml_parser", - "toml_writer", - "winnow 0.7.15", -] - [[package]] name = "toml_datetime" version = "0.6.8" @@ -6009,15 +5687,6 @@ dependencies = [ "serde", ] -[[package]] -name = "toml_datetime" -version = "1.0.0+spec-1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32c2555c699578a4f59f0cc68e5116c8d7cabbd45e1409b989d4be085b53f13e" -dependencies = [ - "serde_core", -] - [[package]] name = "toml_edit" version = "0.20.7" @@ -6025,7 +5694,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70f427fce4d84c72b5b732388bf4a9f4531b53f74e2887e3ecb2481f68f66d81" dependencies = [ "indexmap 2.12.1", - "toml_datetime 0.6.8", + "toml_datetime", "winnow 0.5.40", ] @@ -6037,26 +5706,11 @@ checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" dependencies = [ "indexmap 2.12.1", "serde", - "serde_spanned 0.6.8", - "toml_datetime 0.6.8", + "serde_spanned", + "toml_datetime", "winnow 0.6.24", ] -[[package]] -name = "toml_parser" -version = "1.0.9+spec-1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "702d4415e08923e7e1ef96cd5727c0dfed80b4d2fa25db9647fe5eb6f7c5a4c4" -dependencies = [ - "winnow 0.7.15", -] - -[[package]] -name = "toml_writer" -version = "1.0.6+spec-1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab16f14aed21ee8bfd8ec22513f7287cd4a91aa92e44edfe2c17ddd004e92607" - [[package]] name = "tonic" version = "0.14.2" @@ -6202,19 +5856,6 @@ dependencies = [ "tracing-core", ] -[[package]] -name = "tracing-opentelemetry" -version = "0.17.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbbe89715c1dbbb790059e2565353978564924ee85017b5fff365c872ff6721f" -dependencies = [ - "once_cell", - "opentelemetry", - "tracing", - "tracing-core", - "tracing-subscriber", -] - [[package]] name = "tracing-serde" version = "0.2.0" @@ -6252,21 +5893,6 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" -[[package]] -name = "trybuild" -version = "1.0.116" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47c635f0191bd3a2941013e5062667100969f8c4e9cd787c14f977265d73616e" -dependencies = [ - "glob", - "serde", - "serde_derive", - "serde_json", - "target-triple 1.0.0", - "termcolor", - "toml 1.0.6+spec-1.1.0", -] - [[package]] name = "twox-hash" version = "1.6.3" @@ -6593,9 +6219,9 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "0.26.7" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d642ff16b7e79272ae451b7322067cdc17cadf68c23264be9d94a32319efe7e" +checksum = "22cfaf3c063993ff62e73cb4311efde4db1efb31ab78a3e5c457939ad5cc0bed" dependencies = [ "rustls-pki-types", ] @@ -7103,12 +6729,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "winnow" -version = "0.7.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df79d97927682d2fd8adb29682d1140b343be4ac0f08fd68b7765d9c059d3945" - [[package]] name = "winreg" version = "0.50.0" diff --git a/Cargo.toml b/Cargo.toml index 133dc5f245b..c671078e95b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,9 +5,8 @@ resolver = "2" [workspace.package] rust-version = "1.84.1" edition = "2021" -# Version must match libdatadog submodule version so that `version.workspace = true` crates -# resolve to a version compatible with their dependents' requirements. -version = "28.0.3" +# Irrelevant version and license. These do NOT apply here, they just are here to make cargo build pass. +version = "0.0.1" license = "Apache-2.0" [profile.dev] diff --git a/Makefile b/Makefile index ead58e7ac8f..3e16a42f432 100644 --- a/Makefile +++ b/Makefile @@ -113,7 +113,14 @@ $(BUILD_DIR)/run-tests.php: $(if $(ASSUME_COMPILED),, $(BUILD_DIR)/configure) $(if $(ASSUME_COMPILED), cp $(shell dirname $(shell realpath $(shell which phpize)))/../lib/php/build/run-tests.php $(BUILD_DIR)/run-tests.php) sed -i 's/\bdl(/(bool)(/' $(BUILD_DIR)/run-tests.php # this dl() stuff in run-tests.php is for --EXTENSIONS-- sections, which we don't use; just strip it away (see https://github.com/php/php-src/issues/15367) -$(BUILD_DIR)/Makefile: $(BUILD_DIR)/configure +# ensure list of rust files is up to date +$(BUILD_DIR)/.rust_files_list: $(RUST_FILES) + $(Q) printf '%s\n' $(RUST_FILES) | sort > $(BUILD_DIR)/.rust_files_list.tmp + $(Q) cmp -s $(BUILD_DIR)/.rust_files_list $(BUILD_DIR)/.rust_files_list.tmp 2>/dev/null \ + && rm -f $(BUILD_DIR)/.rust_files_list.tmp \ + || mv $(BUILD_DIR)/.rust_files_list.tmp $(BUILD_DIR)/.rust_files_list + +$(BUILD_DIR)/Makefile: $(BUILD_DIR)/configure $(BUILD_DIR)/.rust_files_list $(Q) (cd $(BUILD_DIR); $(if $(ASAN),CFLAGS="${CFLAGS} -DZEND_TRACK_ARENA_ALLOC") ./configure --$(if $(RUST_DEBUG_BUILD),enable,disable)-ddtrace-rust-debug $(if $(ASAN), --enable-ddtrace-sanitize) $(EXTRA_CONFIGURE_OPTIONS)) $(SO_FILE): $(if $(ASSUME_COMPILED),, $(ALL_OBJECT_FILES) $(BUILD_DIR)/compile_rust.sh) diff --git a/components-rs/common.h b/components-rs/common.h index 1a626de0afe..004e00962ea 100644 --- a/components-rs/common.h +++ b/components-rs/common.h @@ -435,13 +435,10 @@ typedef struct ddog_RemoteConfigState ddog_RemoteConfigState; typedef struct ddog_SidecarActionsBuffer ddog_SidecarActionsBuffer; /** - * `SidecarTransport` is a wrapper around a BlockingTransport struct from the `datadog_ipc` crate - * that handles transparent reconnection. - * It is used for sending `SidecarInterfaceRequest` and receiving `SidecarInterfaceResponse`. + * `SidecarTransport` wraps a [`SidecarSender`] with transparent reconnection support. * * This transport is used for communication between different parts of the sidecar service. - * It is a blocking transport, meaning that it will block the current thread until the operation is - * complete. + * It is a blocking transport (all operations block the current thread). */ typedef struct ddog_SidecarTransport ddog_SidecarTransport; diff --git a/components-rs/ddtrace.h b/components-rs/ddtrace.h index b88aa97111d..391bf048b55 100644 --- a/components-rs/ddtrace.h +++ b/components-rs/ddtrace.h @@ -122,7 +122,9 @@ ddog_MaybeError ddog_sidecar_connect_php(struct ddog_SidecarTransport **connecti ddog_CharSlice log_level, bool enable_telemetry, void (*on_reconnect)(struct ddog_SidecarTransport*), - const struct ddog_Endpoint *crashtracker_endpoint); + const struct ddog_Endpoint *crashtracker_endpoint, + uint64_t backpressure_bytes, + uint64_t backpressure_queue); void ddtrace_sidecar_reconnect(struct ddog_SidecarTransport **transport, struct ddog_SidecarTransport *(*factory)(void)); @@ -162,10 +164,10 @@ ddog_MaybeError ddog_sidecar_telemetry_buffer_flush(struct ddog_SidecarTransport const ddog_QueueId *queue_id, struct ddog_SidecarActionsBuffer *buffer); -void ddog_sidecar_telemetry_register_metric_buffer(struct ddog_SidecarActionsBuffer *buffer, - ddog_CharSlice metric_name, - enum ddog_MetricType metric_type, - enum ddog_MetricNamespace namespace_); +ddog_MaybeError ddog_sidecar_telemetry_register_metric(struct ddog_SidecarTransport **transport, + ddog_CharSlice metric_name, + enum ddog_MetricType metric_type, + enum ddog_MetricNamespace namespace_); void ddog_sidecar_telemetry_add_span_metric_point_buffer(struct ddog_SidecarActionsBuffer *buffer, ddog_CharSlice metric_name, diff --git a/components-rs/log.rs b/components-rs/log.rs index f8cd5c890a3..9d7de05abd7 100644 --- a/components-rs/log.rs +++ b/components-rs/log.rs @@ -126,7 +126,7 @@ impl FormatEvent for LogFormatter } else { data.target() }; - format!("[ddtrace] [{}] {}{}\0", target, msg, suffix) + format!("[ddtrace] [{}] [{}] {}{}\0", target, std::process::id(), msg, suffix) } if let Some(msg) = visitor.msg { diff --git a/components-rs/sidecar.h b/components-rs/sidecar.h index 0b0f49e3023..5b0934c7922 100644 --- a/components-rs/sidecar.h +++ b/components-rs/sidecar.h @@ -204,7 +204,7 @@ ddog_MaybeError ddog_sidecar_session_set_config(struct ddog_SidecarTransport **t uintptr_t force_drop_size, ddog_CharSlice log_level, ddog_CharSlice log_path, - void *remote_config_notify_function, + void *_remote_config_notify_function, const enum ddog_RemoteConfigProduct *remote_config_products, uintptr_t remote_config_products_count, const enum ddog_RemoteConfigCapabilities *remote_config_capabilities, @@ -217,7 +217,6 @@ ddog_MaybeError ddog_sidecar_session_set_config(struct ddog_SidecarTransport **t * Updates the process_tags for an existing session. */ ddog_MaybeError ddog_sidecar_session_set_process_tags(struct ddog_SidecarTransport **transport, - ddog_CharSlice session_id, const struct ddog_Vec_Tag *process_tags); /** @@ -371,7 +370,6 @@ ddog_MaybeError ddog_sidecar_dogstatsd_set(struct ddog_SidecarTransport **transp * Sets x-datadog-test-session-token on all requests for the given session. */ ddog_MaybeError ddog_sidecar_set_test_session_token(struct ddog_SidecarTransport **transport, - ddog_CharSlice session_id, ddog_CharSlice token); /** diff --git a/components-rs/sidecar.rs b/components-rs/sidecar.rs index 82d8ed19f0a..210f0ad9d15 100644 --- a/components-rs/sidecar.rs +++ b/components-rs/sidecar.rs @@ -117,6 +117,8 @@ pub extern "C" fn ddog_sidecar_connect_php( enable_telemetry: bool, on_reconnect: Option, crashtracker_endpoint: Option<&Endpoint>, + backpressure_bytes: u64, + backpressure_queue: u64, ) -> MaybeError { let mut cfg = config::FromEnv::config(); cfg.self_telemetry = enable_telemetry; @@ -149,6 +151,8 @@ pub extern "C" fn ddog_sidecar_connect_php( cfg.child_env.insert(OsStr::new("DD_TRACE_LOG_LEVEL").into(), log_level); } + cfg.pipe_buffer_size = backpressure_bytes as usize; + let reconnect_fn = on_reconnect.map(|on_reconnect| { let cfg = cfg.clone(); Box::new(move || { @@ -160,6 +164,7 @@ pub extern "C" fn ddog_sidecar_connect_php( let mut stream = try_c!(sidecar_connect(cfg)); stream.reconnect_fn = reconnect_fn; + let _ = stream.set_backpressure(backpressure_bytes as usize, backpressure_queue); *connection = Box::into_raw(stream); MaybeError::None diff --git a/components-rs/telemetry.rs b/components-rs/telemetry.rs index 1155f3bcb33..491e6c97254 100644 --- a/components-rs/telemetry.rs +++ b/components-rs/telemetry.rs @@ -168,21 +168,23 @@ pub extern "C-unwind" fn ddog_sidecar_telemetry_buffer_flush( } #[no_mangle] -pub unsafe extern "C" fn ddog_sidecar_telemetry_register_metric_buffer( - buffer: &mut SidecarActionsBuffer, +pub unsafe extern "C" fn ddog_sidecar_telemetry_register_metric( + transport: &mut Box, metric_name: CharSlice, metric_type: MetricType, namespace: MetricNamespace, -) { - buffer - .buffer - .push(SidecarAction::RegisterTelemetryMetric(MetricContext { +) -> MaybeError { + try_c!(blocking::register_telemetry_metric( + transport, + MetricContext { name: metric_name.to_utf8_lossy().into_owned(), namespace, metric_type, tags: Vec::default(), common: true, - })); + }, + )); + MaybeError::None } #[no_mangle] @@ -243,7 +245,7 @@ pub struct ShmCache { } #[derive(Hash, Eq, PartialEq)] -struct ShmCacheKey(String, String); +pub struct ShmCacheKey(String, String); impl Equivalent for (&str, &str) { fn equivalent(&self, key: &ShmCacheKey) -> bool { diff --git a/config.m4 b/config.m4 index 9eb5aaca874..799c52fe93d 100644 --- a/config.m4 +++ b/config.m4 @@ -64,6 +64,19 @@ if test "$PHP_DDTRACE" != "no"; then PHP_SUBST(DDTRACE_CARGO) fi + dnl As required by libdd-libunwind-sys + if test "$PHP_DDTRACE_RUST_LIBRARY" = "-"; then + AC_CHECK_TOOL(DDTRACE_AUTOMAKE, automake, [:]) + AS_IF([test "$DDTRACE_AUTOMAKE" = ":"], [AC_MSG_ERROR([Please install automake before configuring])]) + AC_CHECK_TOOL(DDTRACE_LIBTOOL, libtool, [:]) + AS_IF([test "$DDTRACE_LIBTOOL" = ":"], [ + AC_CHECK_TOOL(DDTRACE_LIBTOOLIZE, libtoolize, [:]) + AS_IF([test "$DDTRACE_LIBTOOLIZE" = ":"], [ + AC_MSG_ERROR([Please install libtool before configuring]) + ]) + ]) + fi + if test "$PHP_DDTRACE_SANITIZE" != "no"; then dnl gcc needs -lasan, clang needs -shared-libsan ac_cflags=$LDFLAGS @@ -373,7 +386,7 @@ EOT cat <> Makefile.fragments $ddtrace_rust_lib: $( (find "$ext_srcdir/components-rs" -name "*.rs" -o -name "Cargo.toml"; find "$ext_srcdir/../../libdatadog" -name "*.rs" -not -path "*/target/*"; find "$ext_srcdir/libdatadog" -name "*.rs" -not -path "*/target/*") 2>/dev/null | tr '\n' ' ' ) - (cd "$ext_srcdir"; CARGO_TARGET_DIR=\$(builddir)/target/ SHARED=$(test "$ext_shared" = "yes" && echo 1) PROFILE="$ddtrace_cargo_profile" host_os="$host_os" DDTRACE_CARGO=\$(DDTRACE_CARGO) $(if test "$PHP_DDTRACE_SANITIZE" != "no"; then echo COMPILE_ASAN=1; fi) sh ./compile_rust.sh \$(shell echo "\$(MAKEFLAGS)" | $EGREP -o "[[-]]j[[0-9]]+")) + (cd "$ext_srcdir"; CARGO_TARGET_DIR=\$(builddir)/target/ SHARED=$(test "$ext_shared" = "yes" && echo 1) PROFILE="$ddtrace_cargo_profile" host_os="$host_os" DDTRACE_CARGO="\$(DDTRACE_CARGO)" $(if test "$PHP_DDTRACE_SANITIZE" != "no"; then echo COMPILE_ASAN=1; fi) sh ./compile_rust.sh \$(shell echo "\$(MAKEFLAGS)" | $EGREP -o "[[-]]j[[0-9]]+")) EOT fi diff --git a/dockerfiles/ci/alpine_compile_extension/base.Dockerfile b/dockerfiles/ci/alpine_compile_extension/base.Dockerfile index f1627136c74..86d3c905770 100644 --- a/dockerfiles/ci/alpine_compile_extension/base.Dockerfile +++ b/dockerfiles/ci/alpine_compile_extension/base.Dockerfile @@ -9,10 +9,12 @@ RUN set -eux; \ apk add --no-cache \ bash \ autoconf \ + automake \ catch2 \ coreutils \ g++ \ gcc \ + libtool \ make \ cmake \ build-base \ diff --git a/dockerfiles/ci/centos/7/base.Dockerfile b/dockerfiles/ci/centos/7/base.Dockerfile index a221aeeb563..23198e0e55b 100644 --- a/dockerfiles/ci/centos/7/base.Dockerfile +++ b/dockerfiles/ci/centos/7/base.Dockerfile @@ -15,6 +15,7 @@ RUN set -eux; \ gcc \ gcc-c++ \ git \ + help2man \ libcurl-devel \ libedit-devel \ make \ @@ -55,6 +56,22 @@ RUN set -eux; \ ../configure && make -j $(nproc) && make install; \ cd - && rm -fr build +# Automake required +RUN set -eux; \ + /root/download-src.sh automake https://mirrors.kernel.org/gnu/automake/automake-1.13.4.tar.gz; \ + cd "${SRC_DIR}/automake"; \ + mkdir -v 'build' && cd 'build'; \ + ../configure && make -j $(nproc) && make install; \ + cd - && rm -fr build + +# Libtool required +RUN set -eux; \ + /root/download-src.sh libtool https://mirrors.kernel.org/gnu/libtool/libtool-2.5.4.tar.gz; \ + cd "${SRC_DIR}/libtool"; \ + mkdir -v 'build' && cd 'build'; \ + ../configure && make -j $(nproc) && make install; \ + cd - && rm -fr build + # Required: libxml >= 2.9.0 (default version is 2.7.6) RUN source scl_source enable devtoolset-7; set -eux; \ /root/download-src.sh libxml2 http://xmlsoft.org/sources/libxml2-2.9.10.tar.gz; \ @@ -277,7 +294,7 @@ RUN set -eux; \ zlib-devel; \ yum clean all; -RUN printf "source scl_source enable devtoolset-7" | tee -a /etc/profile.d/zzz-ddtrace.sh /etc/bashrc +RUN printf "source scl_source enable devtoolset-7\n" | tee -a /etc/profile.d/zzz-ddtrace.sh /etc/bashrc ENV BASH_ENV="/etc/profile.d/zzz-ddtrace.sh" ENV PATH="/rust/cargo/bin:${PATH}" diff --git a/dockerfiles/ci/centos/7/php.Dockerfile b/dockerfiles/ci/centos/7/php.Dockerfile index 755cb1972f1..281af3e10e8 100644 --- a/dockerfiles/ci/centos/7/php.Dockerfile +++ b/dockerfiles/ci/centos/7/php.Dockerfile @@ -46,8 +46,8 @@ RUN bash -c 'set -eux; \ && make install \ && cp .libs/libphp*.so ${PHP_INSTALL_DIR_ZTS}/lib/apache2handler-libphp.so \ && mkdir -p ${PHP_INSTALL_DIR_ZTS}/conf.d' \ - && [ $(expr substr ${PHP_VERSION} 1 1) = 7 ] || ${PHP_INSTALL_DIR_ZTS}/bin/pecl install parallel || true \ - && [ $(expr substr ${PHP_VERSION} 1 1) = 7 ] || echo "extension=parallel" >> ${PHP_INSTALL_DIR_ZTS}/conf.d/parallel.ini || true + && ( [ $(expr substr ${PHP_VERSION} 1 1) = 7 ] || CFLAGS="${CFLAGS} -std=gnu99" ${PHP_INSTALL_DIR_ZTS}/bin/pecl install parallel ) \ + && ( [ $(expr substr ${PHP_VERSION} 1 1) = 7 ] || echo "extension=parallel" >> ${PHP_INSTALL_DIR_ZTS}/conf.d/parallel.ini ) FROM base AS php-debug RUN bash -c 'set -eux; \ diff --git a/ext/configuration.h b/ext/configuration.h index 6d39fbe9291..599d2ed4eb8 100644 --- a/ext/configuration.h +++ b/ext/configuration.h @@ -228,6 +228,8 @@ enum ddtrace_sidecar_connection_mode { CONFIG(INT, DD_TRACE_AGENT_MAX_PAYLOAD_SIZE, "52428800", .ini_change = zai_config_system_ini_change) \ CONFIG(INT, DD_TRACE_AGENT_STACK_INITIAL_SIZE, "131072", .ini_change = zai_config_system_ini_change) \ CONFIG(INT, DD_TRACE_AGENT_STACK_BACKLOG, "12", .ini_change = zai_config_system_ini_change) \ + CONFIG(INT, DD_TRACE_SIDECAR_BACKPRESSURE_BYTES, "4194304", .ini_change = zai_config_system_ini_change) \ + CONFIG(INT, DD_TRACE_SIDECAR_BACKPRESSURE_QUEUE, "100", .ini_change = zai_config_system_ini_change) \ CONFIG(STRING, DD_TRACE_AGENT_TEST_SESSION_TOKEN, "", .ini_change = ddtrace_alter_test_session_token) \ CONFIG(BOOL, DD_TRACE_PROPAGATE_USER_ID_DEFAULT, "false") \ CONFIG(CUSTOM(INT), DD_DBM_PROPAGATION_MODE, "disabled", .parser = dd_parse_dbm_mode) \ diff --git a/ext/ddtrace.c b/ext/ddtrace.c index cc5979db839..94d9f0d3d9f 100644 --- a/ext/ddtrace.c +++ b/ext/ddtrace.c @@ -1516,15 +1516,15 @@ static PHP_MINIT_FUNCTION(ddtrace) { ddtrace_limiter_create(); ddtrace_standalone_limiter_create(); + ddtrace_log_minit(); + #ifndef _WIN32 /* Snapshot proxy-related env vars once at startup to avoid getenv() * from the background writer thread inside libcurl. */ ddtrace_coms_minit_proxy_env(); - - ddtrace_log_minit(); - ddtrace_dogstatsd_client_minit(); #endif + ddshared_minit(); ddtrace_autoload_minit(); ddtrace_sidecar_minit(); diff --git a/ext/live_debugger.c b/ext/live_debugger.c index da64baff649..85ec375e076 100644 --- a/ext/live_debugger.c +++ b/ext/live_debugger.c @@ -80,7 +80,7 @@ static zend_string *dd_eval_string(const ddog_DslString *string, const ddog_Capt }; ddog_VoidCollection bytes = ddog_evaluate_unmanaged_string(string, &ctx, error); zend_string *str = zend_string_init(bytes.elements, bytes.count, 0); - bytes.free(bytes); + (bytes.free)(bytes); // parens for windows to be happy in debug mode clean_ctx(&ctx); return str; } diff --git a/ext/otel_config.c b/ext/otel_config.c index d9bfae54888..43c08c0b465 100644 --- a/ext/otel_config.c +++ b/ext/otel_config.c @@ -10,9 +10,8 @@ ZEND_EXTERN_MODULE_GLOBALS(ddtrace); static void report_otel_cfg_telemetry_invalid(const char *otel_cfg, const char *dd_cfg, bool pre_rinit) { if (!pre_rinit && ddtrace_sidecar && get_DD_INSTRUMENTATION_TELEMETRY_ENABLED()) { + ddog_sidecar_telemetry_register_metric(&ddtrace_sidecar, DDOG_CHARSLICE_C("otel.env.invalid"), DDOG_METRIC_TYPE_COUNT, DDOG_METRIC_NAMESPACE_TRACERS); ddog_SidecarActionsBuffer *buffer = ddtrace_telemetry_buffer(); - ddog_sidecar_telemetry_register_metric_buffer(buffer, DDOG_CHARSLICE_C("otel.env.invalid"), DDOG_METRIC_TYPE_COUNT, - DDOG_METRIC_NAMESPACE_TRACERS); ddog_CharSlice tags; tags.len = asprintf((char **)&tags.ptr, "config_opentelemetry:%s,config_datadog:%s", otel_cfg, dd_cfg); ddog_sidecar_telemetry_add_span_metric_point_buffer(buffer, DDOG_CHARSLICE_C("otel.env.invalid"), 1, tags); diff --git a/ext/process_tags.c b/ext/process_tags.c index 60be49c36c2..bc24fcc3c26 100644 --- a/ext/process_tags.c +++ b/ext/process_tags.c @@ -314,7 +314,7 @@ zend_string *ddtrace_process_tags_get_base_hash(void) { } bool ddtrace_process_tags_enabled(void){ - return get_DD_EXPERIMENTAL_PROPAGATE_PROCESS_TAGS_ENABLED(); + return zai_config_is_initialized() ? get_DD_EXPERIMENTAL_PROPAGATE_PROCESS_TAGS_ENABLED() : get_global_DD_EXPERIMENTAL_PROPAGATE_PROCESS_TAGS_ENABLED(); } void ddtrace_process_tags_first_rinit(void) { diff --git a/ext/sidecar.c b/ext/sidecar.c index ad3cc5ac24a..2246e0c81e7 100644 --- a/ext/sidecar.c +++ b/ext/sidecar.c @@ -135,8 +135,8 @@ void ddtrace_sidecar_update_process_tags(void) { if (!process_tags || process_tags->len == 0) { return; } - ddog_CharSlice session_id = (ddog_CharSlice) {.ptr = (char *) dd_sidecar_formatted_session_id, .len = sizeof(dd_sidecar_formatted_session_id)}; - ddog_sidecar_session_set_process_tags(&ddtrace_sidecar, session_id, process_tags); + + ddog_sidecar_session_set_process_tags(&ddtrace_sidecar, process_tags); } static ddog_SidecarTransport *dd_sidecar_connection_factory_ex(bool is_fork); @@ -221,7 +221,7 @@ static ddog_SidecarTransport *dd_sidecar_connect(bool as_worker, bool is_fork) { ddog_SidecarTransport *sidecar_transport; if (as_worker) { - if (!ddtrace_ffi_try("Failed connecting to sidecar as worker", + if (!ddtrace_ffi_try("Failed connecting to the sidecar as worker", ddog_sidecar_connect_worker((int32_t)ddtrace_sidecar_master_pid, &sidecar_transport))) { #ifdef _WIN32 int32_t current_pid = (int32_t)GetCurrentProcessId(); @@ -248,12 +248,12 @@ static ddog_SidecarTransport *dd_sidecar_connect(bool as_worker, bool is_fork) { } ddtrace_sidecar_active_mode = DD_SIDECAR_CONNECTION_THREAD; } else { - if (!ddtrace_ffi_try("Failed connecting to sidecar (subprocess mode)", + if (!ddtrace_ffi_try("Failed connecting to the sidecar (subprocess mode)", ddog_sidecar_connect_php(&sidecar_transport, logpath, dd_zend_string_to_CharSlice(get_global_DD_TRACE_LOG_LEVEL()), get_global_DD_INSTRUMENTATION_TELEMETRY_ENABLED(), dd_sidecar_on_reconnect, - ddtrace_endpoint))) { + ddtrace_endpoint, (uint64_t)get_global_DD_TRACE_SIDECAR_BACKPRESSURE_BYTES(), (uint64_t)get_global_DD_TRACE_SIDECAR_BACKPRESSURE_QUEUE()))) { return NULL; } ddtrace_sidecar_active_mode = DD_SIDECAR_CONNECTION_SUBPROCESS; @@ -890,9 +890,8 @@ bool ddtrace_alter_test_session_token(zval *old_value, zval *new_value, zend_str UNUSED(old_value, new_str); if (ddtrace_sidecar) { ddog_endpoint_set_test_token(ddtrace_endpoint, dd_zend_string_to_CharSlice(Z_STR_P(new_value))); - ddog_CharSlice session_id = (ddog_CharSlice) {.ptr = (char *) dd_sidecar_formatted_session_id, .len = sizeof(dd_sidecar_formatted_session_id)}; ddtrace_ffi_try("Failed updating test session token", - ddog_sidecar_set_test_session_token(&ddtrace_sidecar, session_id, dd_zend_string_to_CharSlice(Z_STR_P(new_value)))); + ddog_sidecar_set_test_session_token(&ddtrace_sidecar, dd_zend_string_to_CharSlice(Z_STR_P(new_value)))); } #ifndef _WIN32 ddtrace_coms_set_test_session_token(Z_STRVAL_P(new_value), Z_STRLEN_P(new_value)); diff --git a/ext/telemetry.c b/ext/telemetry.c index 2540555756b..6a0f40941ad 100644 --- a/ext/telemetry.c +++ b/ext/telemetry.c @@ -108,15 +108,12 @@ void ddtrace_telemetry_register_services(ddog_SidecarTransport **sidecar) { dd_bgs_queued_id = ddog_sidecar_queueId_generate(); } - ddog_SidecarActionsBuffer *buffer = ddog_sidecar_telemetry_buffer_alloc(); - ddog_sidecar_telemetry_register_metric_buffer(buffer, DDOG_CHARSLICE_C("trace_api.requests"), DDOG_METRIC_TYPE_COUNT, - DDOG_METRIC_NAMESPACE_TRACERS); - ddog_sidecar_telemetry_register_metric_buffer(buffer, DDOG_CHARSLICE_C("trace_api.responses"), DDOG_METRIC_TYPE_COUNT, - DDOG_METRIC_NAMESPACE_TRACERS); - ddog_sidecar_telemetry_register_metric_buffer(buffer, DDOG_CHARSLICE_C("trace_api.errors"), DDOG_METRIC_TYPE_COUNT, - DDOG_METRIC_NAMESPACE_TRACERS); + ddog_sidecar_telemetry_register_metric(sidecar, DDOG_CHARSLICE_C("trace_api.requests"), DDOG_METRIC_TYPE_COUNT, DDOG_METRIC_NAMESPACE_TRACERS); + ddog_sidecar_telemetry_register_metric(sidecar, DDOG_CHARSLICE_C("trace_api.responses"), DDOG_METRIC_TYPE_COUNT, DDOG_METRIC_NAMESPACE_TRACERS); + ddog_sidecar_telemetry_register_metric(sidecar, DDOG_CHARSLICE_C("trace_api.errors"), DDOG_METRIC_TYPE_COUNT, DDOG_METRIC_NAMESPACE_TRACERS); // FIXME: it seems we must call "enqueue_actions" (even with an empty list of actions) for things to work properly + ddog_SidecarActionsBuffer *buffer = ddog_sidecar_telemetry_buffer_alloc(); ddtrace_ffi_try("Failed flushing background sender telemetry buffer", ddog_sidecar_telemetry_buffer_flush(sidecar, ddtrace_sidecar_instance_id, &dd_bgs_queued_id, buffer)); } @@ -223,7 +220,7 @@ void ddtrace_telemetry_finalize() { // Telemetry metrics ddog_CharSlice metric_name = DDOG_CHARSLICE_C("spans_created"); - ddog_sidecar_telemetry_register_metric_buffer(buffer, metric_name, DDOG_METRIC_TYPE_COUNT, DDOG_METRIC_NAMESPACE_TRACERS); + ddog_sidecar_telemetry_register_metric(&ddtrace_sidecar, metric_name, DDOG_METRIC_TYPE_COUNT, DDOG_METRIC_NAMESPACE_TRACERS); zend_string *integration_name; zval *metric_value; ZEND_HASH_FOREACH_STR_KEY_VAL(&DDTRACE_G(telemetry_spans_created_per_integration), integration_name, metric_value) { @@ -232,18 +229,18 @@ void ddtrace_telemetry_finalize() { zai_string_destroy(&tags); } ZEND_HASH_FOREACH_END(); - ddog_sidecar_telemetry_register_metric_buffer(buffer, DDOG_CHARSLICE_C("context_header_style.extracted"), DDOG_METRIC_TYPE_COUNT, DDOG_METRIC_NAMESPACE_TRACERS); + ddog_sidecar_telemetry_register_metric(&ddtrace_sidecar, DDOG_CHARSLICE_C("context_header_style.extracted"), DDOG_METRIC_TYPE_COUNT, DDOG_METRIC_NAMESPACE_TRACERS); ddog_sidecar_telemetry_add_span_metric_point_buffer(buffer, DDOG_CHARSLICE_C("context_header_style.extracted"), DDTRACE_G(baggage_extract_count), DDOG_CHARSLICE_C("header_style:baggage")); - ddog_sidecar_telemetry_register_metric_buffer(buffer, DDOG_CHARSLICE_C("context_header_style.injected"), DDOG_METRIC_TYPE_COUNT, DDOG_METRIC_NAMESPACE_TRACERS); + ddog_sidecar_telemetry_register_metric(&ddtrace_sidecar, DDOG_CHARSLICE_C("context_header_style.injected"), DDOG_METRIC_TYPE_COUNT, DDOG_METRIC_NAMESPACE_TRACERS); ddog_sidecar_telemetry_add_span_metric_point_buffer(buffer, DDOG_CHARSLICE_C("context_header_style.injected"), DDTRACE_G(baggage_inject_count), DDOG_CHARSLICE_C("header_style:baggage")); - ddog_sidecar_telemetry_register_metric_buffer(buffer, DDOG_CHARSLICE_C("context_header.truncated"), DDOG_METRIC_TYPE_COUNT, DDOG_METRIC_NAMESPACE_TRACERS); + ddog_sidecar_telemetry_register_metric(&ddtrace_sidecar, DDOG_CHARSLICE_C("context_header.truncated"), DDOG_METRIC_TYPE_COUNT, DDOG_METRIC_NAMESPACE_TRACERS); ddog_sidecar_telemetry_add_span_metric_point_buffer(buffer, DDOG_CHARSLICE_C("context_header.truncated"), DDTRACE_G(baggage_max_item_count), DDOG_CHARSLICE_C("truncation_reason:baggage_byte_item_exceeded")); ddog_sidecar_telemetry_add_span_metric_point_buffer(buffer, DDOG_CHARSLICE_C("context_header.truncated"), DDTRACE_G(baggage_max_byte_count), DDOG_CHARSLICE_C("truncation_reason:baggage_byte_count_exceeded")); - ddog_sidecar_telemetry_register_metric_buffer(buffer, DDOG_CHARSLICE_C("context_header_style.malformed"), DDOG_METRIC_TYPE_COUNT, DDOG_METRIC_NAMESPACE_TRACERS); + ddog_sidecar_telemetry_register_metric(&ddtrace_sidecar, DDOG_CHARSLICE_C("context_header_style.malformed"), DDOG_METRIC_TYPE_COUNT, DDOG_METRIC_NAMESPACE_TRACERS); ddog_sidecar_telemetry_add_span_metric_point_buffer(buffer, DDOG_CHARSLICE_C("context_header_style.malformed"), DDTRACE_G(baggage_malformed_count), DDOG_CHARSLICE_C("header_style:baggage")); metric_name = DDOG_CHARSLICE_C("logs_created"); - ddog_sidecar_telemetry_register_metric_buffer(buffer, metric_name, DDOG_METRIC_TYPE_COUNT, DDOG_METRIC_NAMESPACE_GENERAL); + ddog_sidecar_telemetry_register_metric(&ddtrace_sidecar, metric_name, DDOG_METRIC_TYPE_COUNT, DDOG_METRIC_NAMESPACE_GENERAL); static struct { ddog_CharSlice level; ddog_CharSlice tags; @@ -358,12 +355,11 @@ ZEND_TLS ddog_SidecarActionsBuffer *metrics_buffer; DDTRACE_PUBLIC void ddtrace_metric_register_buffer(zend_string *name, ddog_MetricType type, ddog_MetricNamespace ns) { - if (!metrics_buffer) { - metrics_buffer = ddog_sidecar_telemetry_buffer_alloc(); + if (!ddtrace_sidecar) { + return; } - ddog_CharSlice metric_name = dd_zend_string_to_CharSlice(name); - ddog_sidecar_telemetry_register_metric_buffer(metrics_buffer, metric_name, type, ns); + ddog_sidecar_telemetry_register_metric(&ddtrace_sidecar, metric_name, type, ns); } DDTRACE_PUBLIC bool ddtrace_metric_add_point(zend_string *name, double value, zend_string *tags) { diff --git a/libdatadog b/libdatadog index cc4a550bf60..561f772f872 160000 --- a/libdatadog +++ b/libdatadog @@ -1 +1 @@ -Subproject commit cc4a550bf6063f80e969332485df806e2c420ebf +Subproject commit 561f772f872ed2edc523ffbd6a2f65e7172ab6dd diff --git a/loader/dd_library_loader.c b/loader/dd_library_loader.c index 35cdc08811c..2846839f910 100644 --- a/loader/dd_library_loader.c +++ b/loader/dd_library_loader.c @@ -313,10 +313,43 @@ void ddloader_logf(injected_ext *config, log_level level, const char *format, .. va_end(va); } -static void *ddloader_reap_child(void *arg) { - pid_t pid = (pid_t)(intptr_t)arg; +typedef struct { + pid_t pid; + void *self_handle; // dlopen handle for this .so, closed by the thread +} ddloader_reaper_arg; + +// Reaps the telemetry child process, then tail-calls dlclose() to release the +// extra reference on this .so that was acquired before thread creation. +// The tail call ensures dlclose() returns directly to libpthread's start_thread +// without ever returning into this .so's code, which may be unmapped when +// dlclose() releases the last reference and runs munmap. +// +// [[clang::musttail]] guarantees the tail call at the source level (compile +// error if not possible). __attribute__((optimize("O2"))) is the GCC fallback +// to enable sibling-call optimisation. Both are needed because musttail +// requires a single CK_IntegralToPointer cast, while GCC -Wint-to-pointer-cast +// requires the (intptr_t) intermediate; using __has_attribute lets us pick the +// right form for each compiler. +// Redeclare dlclose under a private name with void* return type so the tail +// call is type-correct without any cast. int and void* share the same return +// register on all supported ABIs; the return value is discarded anyway. +extern void *ddloader_dlclose(void *) __asm__("dlclose"); + +#if defined(__has_attribute) && __has_attribute(musttail) +# define DDLOADER_MUSTTAIL __attribute__((musttail)) +#elif defined(__clang__) && __clang_major__ >= 13 +# define DDLOADER_MUSTTAIL [[clang::musttail]] +#else +# define DDLOADER_MUSTTAIL +__attribute__((optimize("O2"))) +#endif +static void *ddloader_reap_child(void *arg_) { + ddloader_reaper_arg *arg = (ddloader_reaper_arg *)arg_; + pid_t pid = arg->pid; + void *handle = arg->self_handle; + free(arg); waitpid(pid, NULL, 0); - return NULL; + DDLOADER_MUSTTAIL return ddloader_dlclose(handle); } /** @@ -414,11 +447,20 @@ static void ddloader_telemetryf(telemetry_reason reason, injected_ext *config, c } if (pid > 0) { // reap the child in a background thread to avoid leaking it + ddloader_reaper_arg *reaper_arg = malloc(sizeof(*reaper_arg)); + reaper_arg->pid = pid; + // Bump our own refcount so this .so stays mapped while the reaper + // thread is running. The thread will tail-call dlclose() to release it. + Dl_info info; + reaper_arg->self_handle = + (dladdr((void *)ddloader_telemetryf, &info) && info.dli_fname) + ? dlopen(info.dli_fname, RTLD_LAZY) + : NULL; pthread_t reaper; pthread_attr_t attr; pthread_attr_init(&attr); pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); - pthread_create(&reaper, &attr, ddloader_reap_child, (void *)(intptr_t)pid); + pthread_create(&reaper, &attr, ddloader_reap_child, reaper_arg); pthread_attr_destroy(&attr); return; // parent } diff --git a/loader/tests/functional/test_incompatibility_jit.php b/loader/tests/functional/test_incompatibility_jit.php index d96abe78d67..4b0525eda10 100644 --- a/loader/tests/functional/test_incompatibility_jit.php +++ b/loader/tests/functional/test_incompatibility_jit.php @@ -120,10 +120,8 @@ jit.buffer_size: 33554416 EOT , - << [<< [<< --EXPECTF-- -[ddtrace] [warning] Error raised in autoloaded file %s_files_api.php: %s(): Failed opening '%s_files_api.php' for inclusion %s on line %d -[ddtrace] [warning] Error raised in autoloaded file %s_files_tracer.php: %s(): Failed opening '%s_files_tracer.php' for inclusion %s on line %d -[ddtrace] [warning] Error raised in autoloaded file %sDDTrace/OpenBaseDir.php: %s(): Failed opening '%sDDTrace/OpenBaseDir.php' for inclusion %s on line %d +[ddtrace] [warning] [%d] Error raised in autoloaded file %s_files_api.php: %s(): Failed opening '%s_files_api.php' for inclusion %s on line %d +[ddtrace] [warning] [%d] Error raised in autoloaded file %s_files_tracer.php: %s(): Failed opening '%s_files_tracer.php' for inclusion %s on line %d +[ddtrace] [warning] [%d] Error raised in autoloaded file %sDDTrace/OpenBaseDir.php: %s(): Failed opening '%sDDTrace/OpenBaseDir.php' for inclusion %s on line %d Done. -[ddtrace] [info] Flushing trace of size 1 to send-queue for %s +[ddtrace] [info] [%d] Flushing trace of size 1 to send-queue for %s diff --git a/tests/ext/autoload-php-files/error_get_last_is_unaffected.phpt b/tests/ext/autoload-php-files/error_get_last_is_unaffected.phpt index a5cc003137b..bf86e43f422 100644 --- a/tests/ext/autoload-php-files/error_get_last_is_unaffected.phpt +++ b/tests/ext/autoload-php-files/error_get_last_is_unaffected.phpt @@ -14,7 +14,7 @@ class_exists('DDTrace\RaisesNotice'); var_dump(error_get_last()); ?> --EXPECTF-- -[ddtrace] [warning] Error raised in autoloaded file %s_files_api.php: %s(): Failed opening '%s_files_api.php' for inclusion %s on line %d -[ddtrace] [warning] Error raised in autoloaded file %sRaisesNotice.php: Notice? in %s on line %d +[ddtrace] [warning] [%d] Error raised in autoloaded file %s_files_api.php: %s(): Failed opening '%s_files_api.php' for inclusion %s on line %d +[ddtrace] [warning] [%d] Error raised in autoloaded file %sRaisesNotice.php: Notice? in %s on line %d NULL -[ddtrace] [info] Flushing trace of size 1 to send-queue for %s +[ddtrace] [info] [%d] Flushing trace of size 1 to send-queue for %s diff --git a/tests/ext/autoload-php-files/file_not_found.phpt b/tests/ext/autoload-php-files/file_not_found.phpt index 413b3d19ad0..a6454617206 100644 --- a/tests/ext/autoload-php-files/file_not_found.phpt +++ b/tests/ext/autoload-php-files/file_not_found.phpt @@ -15,7 +15,7 @@ echo "Request start" . PHP_EOL; ?> --EXPECTF-- -[ddtrace] [warning] Error raised in autoloaded file %s_files_api.php: %s(): Failed opening '%s_files_api.php' for inclusion %s on line %d -[ddtrace] [warning] Error raised in autoloaded file %s_files_tracer.php: %s(): Failed opening '%s_files_tracer.php' for inclusion %s on line %d +[ddtrace] [warning] [%d] Error raised in autoloaded file %s_files_api.php: %s(): Failed opening '%s_files_api.php' for inclusion %s on line %d +[ddtrace] [warning] [%d] Error raised in autoloaded file %s_files_tracer.php: %s(): Failed opening '%s_files_tracer.php' for inclusion %s on line %d Request start -[ddtrace] [info] Flushing trace of size 1 to send-queue for %s +[ddtrace] [info] [%d] Flushing trace of size 1 to send-queue for %s diff --git a/tests/ext/autoload-php-files/ignores_exceptions.phpt b/tests/ext/autoload-php-files/ignores_exceptions.phpt index 993d1bd08be..b77c513da8b 100644 --- a/tests/ext/autoload-php-files/ignores_exceptions.phpt +++ b/tests/ext/autoload-php-files/ignores_exceptions.phpt @@ -15,8 +15,8 @@ echo "Request start" . PHP_EOL; ?> --EXPECTF-- -[ddtrace] [warning] Error raised in autoloaded file %s_files_api.php: %s(): Failed opening '%s_files_api.php' for inclusion %s on line %d +[ddtrace] [warning] [%d] Error raised in autoloaded file %s_files_api.php: %s(): Failed opening '%s_files_api.php' for inclusion %s on line %d Throwing an exception... -[ddtrace] [warning] Exception thrown in autoloaded file %sRaisesException.php: Oops! +[ddtrace] [warning] [%d] Exception thrown in autoloaded file %sRaisesException.php: Oops! Request start -[ddtrace] [info] Flushing trace of size 1 to send-queue for %s +[ddtrace] [info] [%d] Flushing trace of size 1 to send-queue for %s diff --git a/tests/ext/autoload-php-files/ignores_fatal_errors.phpt b/tests/ext/autoload-php-files/ignores_fatal_errors.phpt index e3a85930201..1e5f7a8826f 100644 --- a/tests/ext/autoload-php-files/ignores_fatal_errors.phpt +++ b/tests/ext/autoload-php-files/ignores_fatal_errors.phpt @@ -17,8 +17,8 @@ echo "Request start" . PHP_EOL; ?> --EXPECTF-- -[ddtrace] [warning] Error raised in autoloaded file %s_files_api.php: %s(): Failed opening '%s_files_api.php' for inclusion %s on line %d +[ddtrace] [warning] [%d] Error raised in autoloaded file %s_files_api.php: %s(): Failed opening '%s_files_api.php' for inclusion %s on line %d Calling a function that does not exist... -[ddtrace] [warning] Error raised in autoloaded file %s: Allowed memory size of 20971520 bytes exhausted %s on line %d +[ddtrace] [warning] [%d] Error raised in autoloaded file %s: Allowed memory size of 20971520 bytes exhausted %s on line %d Request start -[ddtrace] [info] Flushing trace of size 1 to send-queue for %s +[ddtrace] [info] [%d] Flushing trace of size 1 to send-queue for %s diff --git a/tests/ext/background-sender/agent_headers.phpt b/tests/ext/background-sender/agent_headers.phpt index 92e036efbaa..75c4120b047 100644 --- a/tests/ext/background-sender/agent_headers.phpt +++ b/tests/ext/background-sender/agent_headers.phpt @@ -39,7 +39,7 @@ echo 'Done.' . PHP_EOL; ?> --EXPECTF-- -[ddtrace] [info] Flushing trace of size 1 to send-queue for http://request-replayer:80 +[ddtrace] [info] [%d] Flushing trace of size 1 to send-queue for http://request-replayer:80 content-type: application/msgpack datadog-meta-lang: php @@ -49,4 +49,4 @@ datadog-meta-tracer-version: %s x-datadog-trace-count: 1 Done. -[ddtrace] [info] No finished traces to be sent to the agent +[ddtrace] [info] [%d] No finished traces to be sent to the agent diff --git a/tests/ext/background-sender/agent_headers_container_id.phpt b/tests/ext/background-sender/agent_headers_container_id.phpt index c00e04ab7b8..6442f0c7bfa 100644 --- a/tests/ext/background-sender/agent_headers_container_id.phpt +++ b/tests/ext/background-sender/agent_headers_container_id.phpt @@ -38,10 +38,10 @@ echo 'Done.' . PHP_EOL; ?> --EXPECTF-- -[ddtrace] [info] Flushing trace of size 1 to send-queue for http://request-replayer:80 +[ddtrace] [info] [%d] Flushing trace of size 1 to send-queue for http://request-replayer:80 datadog-container-id:%s9d5b23edb1ba181e8910389a99906598d69ac9a0ead109ee55730cc416d95f7f datadog-meta-lang: php Done. -[ddtrace] [info] No finished traces to be sent to the agent +[ddtrace] [info] [%d] No finished traces to be sent to the agent diff --git a/tests/ext/background-sender/agent_headers_container_id_empty.phpt b/tests/ext/background-sender/agent_headers_container_id_empty.phpt index 52b7686d91e..c54653abee0 100644 --- a/tests/ext/background-sender/agent_headers_container_id_empty.phpt +++ b/tests/ext/background-sender/agent_headers_container_id_empty.phpt @@ -38,9 +38,9 @@ echo 'Done.' . PHP_EOL; ?> --EXPECTF-- -[ddtrace] [info] Flushing trace of size 1 to send-queue for http://request-replayer:80 +[ddtrace] [info] [%d] Flushing trace of size 1 to send-queue for http://request-replayer:80 datadog-meta-lang: php Done. -[ddtrace] [info] No finished traces to be sent to the agent +[ddtrace] [info] [%d] No finished traces to be sent to the agent diff --git a/tests/ext/background-sender/agent_headers_container_id_fargate.phpt b/tests/ext/background-sender/agent_headers_container_id_fargate.phpt index 23551339f7e..fa4fccffb7e 100644 --- a/tests/ext/background-sender/agent_headers_container_id_fargate.phpt +++ b/tests/ext/background-sender/agent_headers_container_id_fargate.phpt @@ -37,10 +37,10 @@ echo 'Done.' . PHP_EOL; ?> --EXPECTF-- -[ddtrace] [info] Flushing trace of size 1 to send-queue for http://request-replayer:80 +[ddtrace] [info] [%d] Flushing trace of size 1 to send-queue for http://request-replayer:80 datadog-container-id:%s34dc0b5e626f2c5c4c5170e34b10e765-1234567890 datadog-meta-lang: php Done. -[ddtrace] [info] No finished traces to be sent to the agent +[ddtrace] [info] [%d] No finished traces to be sent to the agent diff --git a/tests/ext/background-sender/agent_headers_ignore_userland.phpt b/tests/ext/background-sender/agent_headers_ignore_userland.phpt index 0db6377960d..224fcd64655 100644 --- a/tests/ext/background-sender/agent_headers_ignore_userland.phpt +++ b/tests/ext/background-sender/agent_headers_ignore_userland.phpt @@ -46,4 +46,4 @@ bool(true) datadog-meta-lang: php Done. -[ddtrace] [info] No finished traces to be sent to the agent +[ddtrace] [info] [%d] No finished traces to be sent to the agent diff --git a/tests/ext/background-sender/agent_sampling.phpt b/tests/ext/background-sender/agent_sampling.phpt index 2e277539fbd..cd3a4c9befd 100644 --- a/tests/ext/background-sender/agent_sampling.phpt +++ b/tests/ext/background-sender/agent_sampling.phpt @@ -53,10 +53,10 @@ echo "Specific sampling: {$get_sampling()}\n"; ?> --EXPECTF-- -[ddtrace] [info] Flushing trace of size 1 to send-queue for http://request-replayer:80 +[ddtrace] [info] [%d] Flushing trace of size 1 to send-queue for http://request-replayer:80 Initial sampling: 1 -[ddtrace] [info] Flushing trace of size 1 to send-queue for http://request-replayer:80 +[ddtrace] [info] [%d] Flushing trace of size 1 to send-queue for http://request-replayer:80 Generic sampling: 0 -[ddtrace] [info] Flushing trace of size 1 to send-queue for http://request-replayer:80 +[ddtrace] [info] [%d] Flushing trace of size 1 to send-queue for http://request-replayer:80 Specific sampling: 1 -[ddtrace] [info] No finished traces to be sent to the agent +[ddtrace] [info] [%d] No finished traces to be sent to the agent diff --git a/tests/ext/background-sender/agent_sampling_sidecar.phpt b/tests/ext/background-sender/agent_sampling_sidecar.phpt index c23eaea3294..79b487830ed 100644 --- a/tests/ext/background-sender/agent_sampling_sidecar.phpt +++ b/tests/ext/background-sender/agent_sampling_sidecar.phpt @@ -37,7 +37,8 @@ function checkUpdated($marker) { } } } - usleep(100000); + $fn = "us" . "leep"; // do not retry + $fn(100000); } while (--$retries); foreach (glob("/dev/shm/*") as $f) { var_dump($f, bin2hex(file_get_contents($f))); @@ -105,10 +106,10 @@ if ($error && PHP_OS === "Linux") { ?> --EXPECTF-- -[ddtrace] [info] Flushing trace of size 1 to send-queue for http://request-replayer:80 +[ddtrace] [info] [%d] Flushing trace of size 1 to send-queue for http://request-replayer:80 Initial sampling: 1 -[ddtrace] [info] Flushing trace of size 1 to send-queue for http://request-replayer:80 +[ddtrace] [info] [%d] Flushing trace of size 1 to send-queue for http://request-replayer:80 Generic sampling: 0 -[ddtrace] [info] Flushing trace of size 1 to send-queue for http://request-replayer:80 +[ddtrace] [info] [%d] Flushing trace of size 1 to send-queue for http://request-replayer:80 Specific sampling: 1 -[ddtrace] [info] No finished traces to be sent to the agent +[ddtrace] [info] [%d] No finished traces to be sent to the agent diff --git a/tests/ext/background-sender/sidecar_handles_invalid_agent_url.phpt b/tests/ext/background-sender/sidecar_handles_invalid_agent_url.phpt index 4665a9a1106..ffeddf8c2a4 100644 --- a/tests/ext/background-sender/sidecar_handles_invalid_agent_url.phpt +++ b/tests/ext/background-sender/sidecar_handles_invalid_agent_url.phpt @@ -12,4 +12,4 @@ DD_CRASHTRACKING_ENABLED=0 ?> --EXPECTF-- -[ddtrace] [error] Invalid DD_TRACE_AGENT_URL: /invalid. A proper agent URL must be unix:///path/to/agent.sock or http://hostname:port/. +[ddtrace] [error] [%d] Invalid DD_TRACE_AGENT_URL: /invalid. A proper agent URL must be unix:///path/to/agent.sock or http://hostname:port/. diff --git a/tests/ext/background-sender/sidecar_thread_mode_permissions.phpt b/tests/ext/background-sender/sidecar_thread_mode_permissions.phpt index 09c8436402b..8b193b7bec0 100644 --- a/tests/ext/background-sender/sidecar_thread_mode_permissions.phpt +++ b/tests/ext/background-sender/sidecar_thread_mode_permissions.phpt @@ -2,7 +2,6 @@ Thread mode sidecar uses abstract Unix socket --SKIPIF-- - --ENV-- DD_TRACE_SIDECAR_CONNECTION_MODE=thread diff --git a/tests/ext/close_spans_until.phpt b/tests/ext/close_spans_until.phpt index 2ff84cd1cb0..5c34a590089 100644 --- a/tests/ext/close_spans_until.phpt +++ b/tests/ext/close_spans_until.phpt @@ -25,34 +25,34 @@ var_dump(DDTrace\close_spans_until(null)); var_dump(DDTrace\close_spans_until(null)); ?> --EXPECTF-- -[ddtrace] [span] Creating new root SpanStack: %d, parent_stack: 0 -[ddtrace] [span] Creating new root SpanStack: %d, parent_stack: %d -[ddtrace] [span] Switching to different SpanStack: %d -[ddtrace] [span] Starting new root span: trace_id=%s, span_id=%d, parent_id=0, SpanStack=%d, parent_SpanStack=%d -[ddtrace] [span] Starting new span: trace_id=%s, span_id=%d, parent_id=%d, SpanStack=%d -[ddtrace] [span] Starting new span: trace_id=%s, span_id=%d, parent_id=%d, SpanStack=%d -[ddtrace] [span] Starting new span: trace_id=%s, span_id=%d, parent_id=%d, SpanStack=%d +[ddtrace] [span] [%d] Creating new root SpanStack: %d, parent_stack: 0 +[ddtrace] [span] [%d] Creating new root SpanStack: %d, parent_stack: %d +[ddtrace] [span] [%d] Switching to different SpanStack: %d +[ddtrace] [span] [%d] Starting new root span: trace_id=%s, span_id=%d, parent_id=0, SpanStack=%d, parent_SpanStack=%d +[ddtrace] [span] [%d] Starting new span: trace_id=%s, span_id=%d, parent_id=%d, SpanStack=%d +[ddtrace] [span] [%d] Starting new span: trace_id=%s, span_id=%d, parent_id=%d, SpanStack=%d +[ddtrace] [span] [%d] Starting new span: trace_id=%s, span_id=%d, parent_id=%d, SpanStack=%d bool(false) -[ddtrace] [span] Closing span: trace_id=%s, span_id=%d -[ddtrace] [span] Closing span: trace_id=%s, span_id=%d +[ddtrace] [span] [%d] Closing span: trace_id=%s, span_id=%d +[ddtrace] [span] [%d] Closing span: trace_id=%s, span_id=%d int(2) -[ddtrace] [span] Starting new span: trace_id=%s, span_id=%d, parent_id=%d, SpanStack=%d -[ddtrace] [span] Starting new span: trace_id=%s, span_id=%d, parent_id=%d, SpanStack=%d -[ddtrace] [span] Starting new span: trace_id=%s, span_id=%d, parent_id=%d, SpanStack=%d -[ddtrace] [span] Closing span: trace_id=%s, span_id=%d -[ddtrace] [span] Closing span: trace_id=%s, span_id=%d +[ddtrace] [span] [%d] Starting new span: trace_id=%s, span_id=%d, parent_id=%d, SpanStack=%d +[ddtrace] [span] [%d] Starting new span: trace_id=%s, span_id=%d, parent_id=%d, SpanStack=%d +[ddtrace] [span] [%d] Starting new span: trace_id=%s, span_id=%d, parent_id=%d, SpanStack=%d +[ddtrace] [span] [%d] Closing span: trace_id=%s, span_id=%d +[ddtrace] [span] [%d] Closing span: trace_id=%s, span_id=%d int(2) -[ddtrace] [span] Closing span: trace_id=%s, span_id=%d -[ddtrace] [span] Closing span: trace_id=%s, span_id=%d -[ddtrace] [span] Closing root span: trace_id=%s, span_id=%d -[ddtrace] [span] Switching to different SpanStack: %d +[ddtrace] [span] [%d] Closing span: trace_id=%s, span_id=%d +[ddtrace] [span] [%d] Closing span: trace_id=%s, span_id=%d +[ddtrace] [span] [%d] Closing root span: trace_id=%s, span_id=%d +[ddtrace] [span] [%d] Switching to different SpanStack: %d int(1) int(0) -[ddtrace] [span] Encoding span: Span { service: close_spans_until.php, name: close_spans_until.php, resource: close_spans_until.php, type: cli, trace_id: %d, span_id: %d, parent_id: 0, start: %d, duration: %d, error: 0, meta: %s, metrics: %s, meta_struct: {}, span_links: [], span_events: [] } -[ddtrace] [span] Encoding span: Span { service: close_spans_until.php, name: traced, resource: traced, type: cli, trace_id: %d, span_id: %d, parent_id: %d, start: %d, duration: %d, error: %d, meta: %s, metrics: %s, meta_struct: %s, span_links: %s, span_events: %s } -[ddtrace] [span] Encoding span: Span { service: close_spans_until.php, name: , resource: , type: cli, trace_id: %d, span_id: %d, parent_id: %d, start: %d, duration: %d, error: %d, meta: %s, metrics: %s, meta_struct: %s, span_links: %s, span_events: %s } -[ddtrace] [span] Encoding span: Span { service: close_spans_until.php, name: , resource: , type: cli, trace_id: %d, span_id: %d, parent_id: %d, start: %d, duration: %d, error: %d, meta: %s, metrics: %s, meta_struct: %s, span_links: %s, span_events: %s } -[ddtrace] [span] Encoding span: Span { service: close_spans_until.php, name: , resource: , type: cli, trace_id: %d, span_id: %d, parent_id: %d, start: %d, duration: %d, error: %d, meta: %s, metrics: %s, meta_struct: %s, span_links: %s, span_events: %s } -[ddtrace] [span] Encoding span: Span { service: close_spans_until.php, name: , resource: , type: cli, trace_id: %d, span_id: %d, parent_id: %d, start: %d, duration: %d, error: %d, meta: %s, metrics: %s, meta_struct: %s, span_links: %s, span_events: %s } -[ddtrace] [span] Encoding span: Span { service: close_spans_until.php, name: , resource: , type: cli, trace_id: %d, span_id: %d, parent_id: %d, start: %d, duration: %d, error: %d, meta: %s, metrics: %s, meta_struct: %s, span_links: %s, span_events: %s } -[ddtrace] [info] Flushing trace of size 7 to send-queue for %s +[ddtrace] [span] [%d] Encoding span: Span { service: close_spans_until.php, name: close_spans_until.php, resource: close_spans_until.php, type: cli, trace_id: %d, span_id: %d, parent_id: 0, start: %d, duration: %d, error: 0, meta: %s, metrics: %s, meta_struct: {}, span_links: [], span_events: [] } +[ddtrace] [span] [%d] Encoding span: Span { service: close_spans_until.php, name: traced, resource: traced, type: cli, trace_id: %d, span_id: %d, parent_id: %d, start: %d, duration: %d, error: %d, meta: %s, metrics: %s, meta_struct: %s, span_links: %s, span_events: %s } +[ddtrace] [span] [%d] Encoding span: Span { service: close_spans_until.php, name: , resource: , type: cli, trace_id: %d, span_id: %d, parent_id: %d, start: %d, duration: %d, error: %d, meta: %s, metrics: %s, meta_struct: %s, span_links: %s, span_events: %s } +[ddtrace] [span] [%d] Encoding span: Span { service: close_spans_until.php, name: , resource: , type: cli, trace_id: %d, span_id: %d, parent_id: %d, start: %d, duration: %d, error: %d, meta: %s, metrics: %s, meta_struct: %s, span_links: %s, span_events: %s } +[ddtrace] [span] [%d] Encoding span: Span { service: close_spans_until.php, name: , resource: , type: cli, trace_id: %d, span_id: %d, parent_id: %d, start: %d, duration: %d, error: %d, meta: %s, metrics: %s, meta_struct: %s, span_links: %s, span_events: %s } +[ddtrace] [span] [%d] Encoding span: Span { service: close_spans_until.php, name: , resource: , type: cli, trace_id: %d, span_id: %d, parent_id: %d, start: %d, duration: %d, error: %d, meta: %s, metrics: %s, meta_struct: %s, span_links: %s, span_events: %s } +[ddtrace] [span] [%d] Encoding span: Span { service: close_spans_until.php, name: , resource: , type: cli, trace_id: %d, span_id: %d, parent_id: %d, start: %d, duration: %d, error: %d, meta: %s, metrics: %s, meta_struct: %s, span_links: %s, span_events: %s } +[ddtrace] [info] [%d] Flushing trace of size 7 to send-queue for %s diff --git a/tests/ext/crashtracker_and_backtrace_are_mutually_exclusive.phpt b/tests/ext/crashtracker_and_backtrace_are_mutually_exclusive.phpt index acba65ebace..d1cc7da9504 100644 --- a/tests/ext/crashtracker_and_backtrace_are_mutually_exclusive.phpt +++ b/tests/ext/crashtracker_and_backtrace_are_mutually_exclusive.phpt @@ -18,5 +18,5 @@ print_r(1); ?> --EXPECTF-- -[ddtrace] [warning] Settings 'datadog.log_backtrace' and 'datadog.crashtracking_enabled' are mutually exclusive. Cannot enable the backtrace. +[ddtrace] [warning] [%d] Settings 'datadog.log_backtrace' and 'datadog.crashtracking_enabled' are mutually exclusive. Cannot enable the backtrace. 1 diff --git a/tests/ext/dd_trace_log_file.phpt b/tests/ext/dd_trace_log_file.phpt index 0c282cf1e50..9de047c50f9 100644 --- a/tests/ext/dd_trace_log_file.phpt +++ b/tests/ext/dd_trace_log_file.phpt @@ -18,6 +18,6 @@ echo $m[0]; ?> --EXPECTF-- -[%s] [ddtrace] [span] Creating new root SpanStack: %d, parent_stack: 0 +[%s] [ddtrace] [span] [%d] Creating new root SpanStack: %d, parent_stack: 0 --CLEAN-- diff --git a/tests/ext/dd_trace_serialize_msgpack_error.phpt b/tests/ext/dd_trace_serialize_msgpack_error.phpt index 6b8bb2e2c92..871f5776d05 100644 --- a/tests/ext/dd_trace_serialize_msgpack_error.phpt +++ b/tests/ext/dd_trace_serialize_msgpack_error.phpt @@ -14,7 +14,7 @@ array_map(function ($data) { ]); ?> --EXPECTF-- -[ddtrace] [warning] Serialize values must be of type array, string, int, float, bool or null +[ddtrace] [warning] [%d] Serialize values must be of type array, string, int, float, bool or null array(1) { [0]=> object(stdClass)#%d (0) { @@ -22,7 +22,7 @@ array(1) { } bool(false) -[ddtrace] [warning] Serialize values must be of type array, string, int, float, bool or null +[ddtrace] [warning] [%d] Serialize values must be of type array, string, int, float, bool or null array(2) { [0]=> string(3) "bar" @@ -31,4 +31,4 @@ array(2) { } bool(false) -[ddtrace] [info] Flushing trace of size 1 to send-queue for %s +[ddtrace] [info] [%d] Flushing trace of size 1 to send-queue for %s diff --git a/tests/ext/dropped_spans_have_negative_duration.phpt b/tests/ext/dropped_spans_have_negative_duration.phpt index 4f4b4a316f2..598be4c6c14 100644 --- a/tests/ext/dropped_spans_have_negative_duration.phpt +++ b/tests/ext/dropped_spans_have_negative_duration.phpt @@ -18,4 +18,4 @@ var_dump($outerSpan->getDuration()); --EXPECTF-- int(1) int(-1) -[ddtrace] [info] No finished traces to be sent to the agent +[ddtrace] [info] [%d] No finished traces to be sent to the agent diff --git a/tests/ext/flush-autofinish.phpt b/tests/ext/flush-autofinish.phpt index fdda23f3348..e890e936475 100644 --- a/tests/ext/flush-autofinish.phpt +++ b/tests/ext/flush-autofinish.phpt @@ -17,7 +17,7 @@ var_dump(DDTrace\active_span() != null); ?> --EXPECTF-- -[ddtrace] [info] Flushing trace of size 2 to send-queue for %s +[ddtrace] [info] [%d] Flushing trace of size 2 to send-queue for %s bool(true) bool(true) -[ddtrace] [info] Flushing trace of size 1 to send-queue for %s +[ddtrace] [info] [%d] Flushing trace of size 1 to send-queue for %s diff --git a/tests/ext/force_flush_traces.phpt b/tests/ext/force_flush_traces.phpt index 831b16c8727..a5cb2dd776b 100644 --- a/tests/ext/force_flush_traces.phpt +++ b/tests/ext/force_flush_traces.phpt @@ -43,5 +43,5 @@ var_dump(dd_trace_serialize_closed_spans()); // Spans should be flushed, so this --EXPECTF-- tracing process process -[ddtrace] [info] Flushing trace of size %r2.*\n.*1|3%r to send-queue for %s +[ddtrace] [info] [%d] Flushing trace of size %r2.*\n.*1|3%r to send-queue for %s kill%r\n*(Killed\n*)?(Termsig=9)?%r diff --git a/tests/ext/inferred_proxy/incomplete_headers.phpt b/tests/ext/inferred_proxy/incomplete_headers.phpt index c1a7a4374bf..a1806eda79a 100644 --- a/tests/ext/inferred_proxy/incomplete_headers.phpt +++ b/tests/ext/inferred_proxy/incomplete_headers.phpt @@ -44,7 +44,7 @@ echo json_encode(dd_trace_serialize_closed_spans(), JSON_PRETTY_PRINT); "service": "aws-server", "type": "web", "meta": { - "_dd.code_origin.frames.0.file": "%s\/incomplete_headers.php", + "_dd.code_origin.frames.0.file": "%sincomplete_headers.php", "_dd.code_origin.frames.0.line": "1", "_dd.code_origin.type": "entry", "_dd.p.dm": "-0", diff --git a/tests/ext/integrations/curl/distributed_tracing_curl.phpt b/tests/ext/integrations/curl/distributed_tracing_curl.phpt index 9b5a8073199..9a561f6649a 100644 --- a/tests/ext/integrations/curl/distributed_tracing_curl.phpt +++ b/tests/ext/integrations/curl/distributed_tracing_curl.phpt @@ -53,7 +53,7 @@ echo 'Done.' . PHP_EOL; ?> --EXPECTF-- -[ddtrace] [error] The to be propagated tag '_dd.p.very=looooooooooooooooong' is too long and exceeds the maximum limit of 25 characters and is thus dropped. +[ddtrace] [error] [%d] The to be propagated tag '_dd.p.very=looooooooooooooooong' is too long and exceeds the maximum limit of 25 characters and is thus dropped. b3: %s-%s-1 traceparent: 00-%s-%s tracestate: dd=p:%s;o:phpt-test @@ -68,4 +68,4 @@ bool(true) bool(true) string(15) "inject_max_size" Done. -[ddtrace] [info] No finished traces to be sent to the agent +[ddtrace] [info] [%d] No finished traces to be sent to the agent diff --git a/tests/ext/integrations/curl/distributed_tracing_curl_copy_handle.phpt b/tests/ext/integrations/curl/distributed_tracing_curl_copy_handle.phpt index 8f9b7cf10fd..8214b7c9f61 100644 --- a/tests/ext/integrations/curl/distributed_tracing_curl_copy_handle.phpt +++ b/tests/ext/integrations/curl/distributed_tracing_curl_copy_handle.phpt @@ -95,4 +95,4 @@ x-datadog-trace-id: %d x-foo: after-the-copy Done. -[ddtrace] [info] Flushing trace of size 5 to send-queue for %s +[ddtrace] [info] [%d] Flushing trace of size 5 to send-queue for %s diff --git a/tests/ext/integrations/curl/distributed_tracing_curl_drop_dm.phpt b/tests/ext/integrations/curl/distributed_tracing_curl_drop_dm.phpt index f287e0bbaea..0dbb9b8362c 100644 --- a/tests/ext/integrations/curl/distributed_tracing_curl_drop_dm.phpt +++ b/tests/ext/integrations/curl/distributed_tracing_curl_drop_dm.phpt @@ -48,4 +48,4 @@ x-datadog-tags: _dd.p.tid=0000001234567890,_dd.p.usr.id=baz64==,_dd.p.url=http:/ x-datadog-trace-id: 8687463697196027922 bool(false) Done. -[ddtrace] [info] No finished traces to be sent to the agent +[ddtrace] [info] [%d] No finished traces to be sent to the agent diff --git a/tests/ext/integrations/curl/distributed_tracing_curl_existing_headers_001.phpt b/tests/ext/integrations/curl/distributed_tracing_curl_existing_headers_001.phpt index db843a66627..e39edbc762e 100644 --- a/tests/ext/integrations/curl/distributed_tracing_curl_existing_headers_001.phpt +++ b/tests/ext/integrations/curl/distributed_tracing_curl_existing_headers_001.phpt @@ -65,4 +65,4 @@ x-mas: tree x-my-custom-header: foo Done. -[ddtrace] [info] Flushing trace of size 3 to send-queue for %s +[ddtrace] [info] [%d] Flushing trace of size 3 to send-queue for %s diff --git a/tests/ext/integrations/curl/distributed_tracing_curl_existing_headers_002.phpt b/tests/ext/integrations/curl/distributed_tracing_curl_existing_headers_002.phpt index f5f15c9bfd8..2f7b20fb70e 100644 --- a/tests/ext/integrations/curl/distributed_tracing_curl_existing_headers_002.phpt +++ b/tests/ext/integrations/curl/distributed_tracing_curl_existing_headers_002.phpt @@ -65,4 +65,4 @@ x-mas: tree x-my-custom-header: foo Done. -[ddtrace] [info] Flushing trace of size 3 to send-queue for %s +[ddtrace] [info] [%d] Flushing trace of size 3 to send-queue for %s diff --git a/tests/ext/integrations/curl/distributed_tracing_curl_existing_headers_003.phpt b/tests/ext/integrations/curl/distributed_tracing_curl_existing_headers_003.phpt index f6ca3ad72d7..2509206ca49 100644 --- a/tests/ext/integrations/curl/distributed_tracing_curl_existing_headers_003.phpt +++ b/tests/ext/integrations/curl/distributed_tracing_curl_existing_headers_003.phpt @@ -82,4 +82,4 @@ x-datadog-parent-id: %d x-orig-header: foo Done. -[ddtrace] [info] Flushing trace of size 3 to send-queue for %s +[ddtrace] [info] [%d] Flushing trace of size 3 to send-queue for %s diff --git a/tests/ext/integrations/curl/distributed_tracing_curl_invalid_tags.phpt b/tests/ext/integrations/curl/distributed_tracing_curl_invalid_tags.phpt index 806838576fe..fdaa4b60d60 100644 --- a/tests/ext/integrations/curl/distributed_tracing_curl_invalid_tags.phpt +++ b/tests/ext/integrations/curl/distributed_tracing_curl_invalid_tags.phpt @@ -48,4 +48,4 @@ x-datadog-origin: ∂~,=;: x-datadog-tags: _dd.p.tid=%s,_dd.p.escaped=_=;: ,_dd.p.dm=-0 bool(false) Done. -[ddtrace] [info] No finished traces to be sent to the agent +[ddtrace] [info] [%d] No finished traces to be sent to the agent diff --git a/tests/ext/integrations/curl/distributed_tracing_curl_multi_exec_001.phpt b/tests/ext/integrations/curl/distributed_tracing_curl_multi_exec_001.phpt index 6387580196c..5d6ac75c126 100644 --- a/tests/ext/integrations/curl/distributed_tracing_curl_multi_exec_001.phpt +++ b/tests/ext/integrations/curl/distributed_tracing_curl_multi_exec_001.phpt @@ -72,4 +72,4 @@ x-datadog-parent-id: %d x-datadog-origin: phpt-test x-datadog-parent-id: %d Done. -[ddtrace] [info] Flushing trace of size 2 to send-queue for %s +[ddtrace] [info] [%d] Flushing trace of size 2 to send-queue for %s diff --git a/tests/ext/integrations/curl/distributed_tracing_curl_multi_exec_002.phpt b/tests/ext/integrations/curl/distributed_tracing_curl_multi_exec_002.phpt index de6eb0607e4..79b4472761b 100644 --- a/tests/ext/integrations/curl/distributed_tracing_curl_multi_exec_002.phpt +++ b/tests/ext/integrations/curl/distributed_tracing_curl_multi_exec_002.phpt @@ -73,4 +73,4 @@ x-datadog-parent-id: %d x-datadog-origin: phpt-test x-datadog-parent-id: %d Done. -[ddtrace] [info] Flushing trace of size 2 to send-queue for %s +[ddtrace] [info] [%d] Flushing trace of size 2 to send-queue for %s diff --git a/tests/ext/integrations/curl/distributed_tracing_curl_multi_exec_003.phpt b/tests/ext/integrations/curl/distributed_tracing_curl_multi_exec_003.phpt index 7d3c5c7afec..253fb227705 100644 --- a/tests/ext/integrations/curl/distributed_tracing_curl_multi_exec_003.phpt +++ b/tests/ext/integrations/curl/distributed_tracing_curl_multi_exec_003.phpt @@ -74,4 +74,4 @@ x-datadog-parent-id: %d x-datadog-origin: phpt-test x-datadog-parent-id: %d Done. -[ddtrace] [info] Flushing trace of size 2 to send-queue for %s +[ddtrace] [info] [%d] Flushing trace of size 2 to send-queue for %s diff --git a/tests/ext/integrations/curl/distributed_tracing_curl_multi_exec_copy_handle.phpt b/tests/ext/integrations/curl/distributed_tracing_curl_multi_exec_copy_handle.phpt index 6d970bf9507..83312123873 100644 --- a/tests/ext/integrations/curl/distributed_tracing_curl_multi_exec_copy_handle.phpt +++ b/tests/ext/integrations/curl/distributed_tracing_curl_multi_exec_copy_handle.phpt @@ -91,4 +91,4 @@ x-datadog-origin: phpt-test x-datadog-parent-id: %d x-foo: not copied Done. -[ddtrace] [info] Flushing trace of size 2 to send-queue for %s +[ddtrace] [info] [%d] Flushing trace of size 2 to send-queue for %s diff --git a/tests/ext/integrations/curl/distributed_tracing_curl_multi_exec_existing_headers_001.phpt b/tests/ext/integrations/curl/distributed_tracing_curl_multi_exec_existing_headers_001.phpt index 8f368c4a95c..c8597de99b4 100644 --- a/tests/ext/integrations/curl/distributed_tracing_curl_multi_exec_existing_headers_001.phpt +++ b/tests/ext/integrations/curl/distributed_tracing_curl_multi_exec_existing_headers_001.phpt @@ -88,4 +88,4 @@ x-ch-2-foo: foo x-datadog-origin: phpt-test x-datadog-parent-id: %d Done. -[ddtrace] [info] Flushing trace of size 2 to send-queue for %s +[ddtrace] [info] [%d] Flushing trace of size 2 to send-queue for %s diff --git a/tests/ext/integrations/curl/distributed_tracing_curl_multi_exec_existing_headers_002.phpt b/tests/ext/integrations/curl/distributed_tracing_curl_multi_exec_existing_headers_002.phpt index 1bc60c7be3b..da71329a71f 100644 --- a/tests/ext/integrations/curl/distributed_tracing_curl_multi_exec_existing_headers_002.phpt +++ b/tests/ext/integrations/curl/distributed_tracing_curl_multi_exec_existing_headers_002.phpt @@ -92,4 +92,4 @@ x-ch-2-foo: foo x-datadog-origin: phpt-test x-datadog-parent-id: %d Done. -[ddtrace] [info] Flushing trace of size 2 to send-queue for %s +[ddtrace] [info] [%d] Flushing trace of size 2 to send-queue for %s diff --git a/tests/ext/integrations/curl/distributed_tracing_curl_tracestate.phpt b/tests/ext/integrations/curl/distributed_tracing_curl_tracestate.phpt index 6eef07a93dc..e8af4544f27 100644 --- a/tests/ext/integrations/curl/distributed_tracing_curl_tracestate.phpt +++ b/tests/ext/integrations/curl/distributed_tracing_curl_tracestate.phpt @@ -48,4 +48,4 @@ x-datadog-origin: phpt-test x-datadog-tags: _dd.p.tid=1234567890123456,_dd.p.test=qvalue,_dd.p.dm=-0 bool(false) Done. -[ddtrace] [info] No finished traces to be sent to the agent +[ddtrace] [info] [%d] No finished traces to be sent to the agent diff --git a/tests/ext/integrations/http_streams/distributed_tracing_http_streams.phpt b/tests/ext/integrations/http_streams/distributed_tracing_http_streams.phpt index 07e30fe74e2..cfa41ac6309 100644 --- a/tests/ext/integrations/http_streams/distributed_tracing_http_streams.phpt +++ b/tests/ext/integrations/http_streams/distributed_tracing_http_streams.phpt @@ -58,7 +58,7 @@ foreach ($span['meta'] as $k => $v) { echo 'Done.' . PHP_EOL; ?> --EXPECTF-- -[ddtrace] [warning] Error loading deferred integration DDTrace\Integrations\Filesystem\FilesystemIntegration: Class not loaded and not autoloadable +[ddtrace] [warning] [%d] Error loading deferred integration DDTrace\Integrations\Filesystem\FilesystemIntegration: Class not loaded and not autoloadable traceparent: %s tracestate: %s x-datadog-parent-id: %d @@ -78,4 +78,4 @@ meta: network.destination.name: %s span.kind: client Done. -[ddtrace] [info] No finished traces to be sent to the agent +[ddtrace] [info] [%d] No finished traces to be sent to the agent diff --git a/tests/ext/integrations/http_streams/distributed_tracing_http_streams_disabled.phpt b/tests/ext/integrations/http_streams/distributed_tracing_http_streams_disabled.phpt index c7f241d1716..0a0259b7803 100644 --- a/tests/ext/integrations/http_streams/distributed_tracing_http_streams_disabled.phpt +++ b/tests/ext/integrations/http_streams/distributed_tracing_http_streams_disabled.phpt @@ -41,7 +41,7 @@ var_dump(count($spans) === 1); echo 'Done.' . PHP_EOL; ?> --EXPECTF-- -[ddtrace] [warning] Error loading deferred integration DDTrace\Integrations\Filesystem\FilesystemIntegration: Class not loaded and not autoloadable +[ddtrace] [warning] [%d] Error loading deferred integration DDTrace\Integrations\Filesystem\FilesystemIntegration: Class not loaded and not autoloadable traceparent: %s tracestate: %s x-datadog-parent-id: %d @@ -50,4 +50,4 @@ x-datadog-tags: %s x-datadog-trace-id: %d bool(true) Done. -[ddtrace] [info] No finished traces to be sent to the agent +[ddtrace] [info] [%d] No finished traces to be sent to the agent diff --git a/tests/ext/integrations/http_streams/distributed_tracing_http_streams_with_headers_array.phpt b/tests/ext/integrations/http_streams/distributed_tracing_http_streams_with_headers_array.phpt index 56cd880ca19..98cb4604ab6 100644 --- a/tests/ext/integrations/http_streams/distributed_tracing_http_streams_with_headers_array.phpt +++ b/tests/ext/integrations/http_streams/distributed_tracing_http_streams_with_headers_array.phpt @@ -71,7 +71,7 @@ foreach ($responses as $key => $response) { echo 'Done.' . PHP_EOL; ?> --EXPECTF-- -[ddtrace] [warning] Error loading deferred integration DDTrace\Integrations\Filesystem\FilesystemIntegration: Class not loaded and not autoloadable +[ddtrace] [warning] [%d] Error loading deferred integration DDTrace\Integrations\Filesystem\FilesystemIntegration: Class not loaded and not autoloadable Response #0 traceparent: %s tracestate: %s @@ -93,4 +93,4 @@ x-datadog-trace-id: %d x-foo: two Done. -[ddtrace] [info] Flushing trace of size 5 to send-queue for %s +[ddtrace] [info] [%d] Flushing trace of size 5 to send-queue for %s diff --git a/tests/ext/integrations/http_streams/distributed_tracing_http_streams_with_headers_string.phpt b/tests/ext/integrations/http_streams/distributed_tracing_http_streams_with_headers_string.phpt index 82e65ab7028..a2acac25e60 100644 --- a/tests/ext/integrations/http_streams/distributed_tracing_http_streams_with_headers_string.phpt +++ b/tests/ext/integrations/http_streams/distributed_tracing_http_streams_with_headers_string.phpt @@ -63,7 +63,7 @@ foreach ($responses as $key => $response) { echo 'Done.' . PHP_EOL; ?> --EXPECTF-- -[ddtrace] [warning] Error loading deferred integration DDTrace\Integrations\Filesystem\FilesystemIntegration: Class not loaded and not autoloadable +[ddtrace] [warning] [%d] Error loading deferred integration DDTrace\Integrations\Filesystem\FilesystemIntegration: Class not loaded and not autoloadable Response #0 traceparent: %s tracestate: %s @@ -85,4 +85,4 @@ x-datadog-trace-id: %d x-foo: two Done. -[ddtrace] [info] Flushing trace of size 5 to send-queue for %s +[ddtrace] [info] [%d] Flushing trace of size 5 to send-queue for %s diff --git a/tests/ext/library_config/fleet_config.phpt b/tests/ext/library_config/fleet_config.phpt index 314803fcea8..5d36d95060e 100644 --- a/tests/ext/library_config/fleet_config.phpt +++ b/tests/ext/library_config/fleet_config.phpt @@ -39,7 +39,7 @@ echo "------ Telemetry ------\n"; dd_trace_internal_fn("finalize_telemetry"); for ($i = 0; $i < 100; ++$i) { - usleep(100000); + ("us" . "leep")(100000); if (file_exists(__DIR__ . '/fleet-config-telemetry.out')) { foreach (file(__DIR__ . '/fleet-config-telemetry.out') as $l) { if ($l) { @@ -67,6 +67,9 @@ for ($i = 0; $i < 100; ++$i) { } } } +if ($i == 100) { + var_dump(file(__DIR__ . '/fleet-config-telemetry.out')); +} ?> --EXPECT-- diff --git a/tests/ext/library_config/local_config.phpt b/tests/ext/library_config/local_config.phpt index a632d91c390..25536179f5e 100644 --- a/tests/ext/library_config/local_config.phpt +++ b/tests/ext/library_config/local_config.phpt @@ -39,7 +39,7 @@ echo "------ Telemetry ------\n"; dd_trace_internal_fn("finalize_telemetry"); for ($i = 0; $i < 100; ++$i) { - usleep(100000); + ("us" . "leep")(100000); if (file_exists(__DIR__ . '/local-config-telemetry.out')) { foreach (file(__DIR__ . '/local-config-telemetry.out') as $l) { if ($l) { @@ -67,6 +67,9 @@ for ($i = 0; $i < 100; ++$i) { } } } +if ($i == 100) { + var_dump(file(__DIR__ . '/local-config-telemetry.out')); +} ?> --EXPECT-- diff --git a/tests/ext/pcntl/pcntl_fork_long_running_autoflush.phpt b/tests/ext/pcntl/pcntl_fork_long_running_autoflush.phpt index f37763d85a1..2431d43fa11 100644 --- a/tests/ext/pcntl/pcntl_fork_long_running_autoflush.phpt +++ b/tests/ext/pcntl/pcntl_fork_long_running_autoflush.phpt @@ -51,15 +51,15 @@ function long_running_entry_point() ?> --EXPECTF-- -[ddtrace] [warning] Error loading deferred integration DDTrace\Integrations\Pcntl\PcntlIntegration: Class not loaded and not autoloadable +[ddtrace] [warning] [%d] Error loading deferred integration DDTrace\Integrations\Pcntl\PcntlIntegration: Class not loaded and not autoloadable child is enabled -[ddtrace] [info] Flushing trace of size 1 to send-queue for %s -[ddtrace] [info] No finished traces to be sent to the agent +[ddtrace] [info] [%d] Flushing trace of size 1 to send-queue for %s +[ddtrace] [info] [%d] No finished traces to be sent to the agent parent is enabled -[ddtrace] [info] Flushing trace of size 3 to send-queue for %s +[ddtrace] [info] [%d] Flushing trace of size 3 to send-queue for %s child is enabled -[ddtrace] [info] Flushing trace of size 1 to send-queue for %s -[ddtrace] [info] No finished traces to be sent to the agent +[ddtrace] [info] [%d] Flushing trace of size 1 to send-queue for %s +[ddtrace] [info] [%d] No finished traces to be sent to the agent parent is enabled -[ddtrace] [info] Flushing trace of size 3 to send-queue for %s -[ddtrace] [info] No finished traces to be sent to the agent +[ddtrace] [info] [%d] Flushing trace of size 3 to send-queue for %s +[ddtrace] [info] [%d] No finished traces to be sent to the agent diff --git a/tests/ext/sandbox-prehook/exception_error_log.phpt b/tests/ext/sandbox-prehook/exception_error_log.phpt index 864bcb09439..d7aded0ecc8 100644 --- a/tests/ext/sandbox-prehook/exception_error_log.phpt +++ b/tests/ext/sandbox-prehook/exception_error_log.phpt @@ -13,6 +13,6 @@ $sum = array_sum([1, 3, 5]); var_dump($sum); ?> --EXPECTF-- -[ddtrace] [warning] RuntimeException thrown in ddtrace's closure defined at %s:%d for array_sum(): This exception is expected in %s on line %d +[ddtrace] [warning] [%d] RuntimeException thrown in ddtrace's closure defined at %s:%d for array_sum(): This exception is expected in %s on line %d int(9) -[ddtrace] [info] Flushing trace of size 2 to send-queue for %s +[ddtrace] [info] [%d] Flushing trace of size 2 to send-queue for %s diff --git a/tests/ext/sandbox-prehook/exceptions_and_errors_are_ignored_in_tracing_closure.phpt b/tests/ext/sandbox-prehook/exceptions_and_errors_are_ignored_in_tracing_closure.phpt index 0f21e38754c..089acda1360 100644 --- a/tests/ext/sandbox-prehook/exceptions_and_errors_are_ignored_in_tracing_closure.phpt +++ b/tests/ext/sandbox-prehook/exceptions_and_errors_are_ignored_in_tracing_closure.phpt @@ -46,12 +46,12 @@ array_map(function($span) { var_dump(error_get_last()); ?> --EXPECTF-- -[ddtrace] [warning] %s in ddtrace's closure defined at %s:%d for Test::testFoo(): Undefined variable%sthis_normally_raises_an_%s -[ddtrace] [warning] Exception thrown in ddtrace's closure defined at %s:%d for mt_srand(): This should be ignored in %s on line %d -[ddtrace] [warning] Error raised in ddtrace's closure defined at %s:%d for mt_rand(): htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s on line %d +[ddtrace] [warning] [%d] %s in ddtrace's closure defined at %s:%d for Test::testFoo(): Undefined variable%sthis_normally_raises_an_%s +[ddtrace] [warning] [%d] Exception thrown in ddtrace's closure defined at %s:%d for mt_srand(): This should be ignored in %s on line %d +[ddtrace] [warning] [%d] Error raised in ddtrace's closure defined at %s:%d for mt_rand(): htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s on line %d Test::testFoo() fav num: %d TestFoo MTRand MTSeed NULL -[ddtrace] [info] No finished traces to be sent to the agent +[ddtrace] [info] [%d] No finished traces to be sent to the agent diff --git a/tests/ext/sandbox-regression/class_resolver_bailout_hook.phpt b/tests/ext/sandbox-regression/class_resolver_bailout_hook.phpt index c7e2dfbdad8..35251dd8993 100644 --- a/tests/ext/sandbox-regression/class_resolver_bailout_hook.phpt +++ b/tests/ext/sandbox-regression/class_resolver_bailout_hook.phpt @@ -27,6 +27,6 @@ class A extends B {} ?> --EXPECTF-- -[ddtrace] [warning] Error raised in ddtrace's closure defined at %s:%d for x(): No D in %s +[ddtrace] [warning] [%d] Error raised in ddtrace's closure defined at %s:%d for x(): No D in %s Leaving Autoloader -[ddtrace] [info] Flushing trace of size 2 to send-queue for %s +[ddtrace] [info] [%d] Flushing trace of size 2 to send-queue for %s diff --git a/tests/ext/sandbox-regression/limiter_reset_flush_with_open_spans.phpt b/tests/ext/sandbox-regression/limiter_reset_flush_with_open_spans.phpt index 52d551b3b16..ab6883b1770 100644 --- a/tests/ext/sandbox-regression/limiter_reset_flush_with_open_spans.phpt +++ b/tests/ext/sandbox-regression/limiter_reset_flush_with_open_spans.phpt @@ -68,7 +68,7 @@ baz() called bar() called string(28) "current :2513787319205155662" string(28) "closing :2513787319205155662" -[ddtrace] [info] Flushing trace of size 2 to send-queue for %s +[ddtrace] [info] [%d] Flushing trace of size 2 to send-queue for %s string(34) "newly active :13874630024467741450" string(28) "initial :1735254072534978428" string(29) "started :10598951352238613536" @@ -78,7 +78,7 @@ baz() called bar() called string(29) "current :10598951352238613536" string(29) "closing :10598951352238613536" -[ddtrace] [info] Flushing trace of size 2 to send-queue for %s +[ddtrace] [info] [%d] Flushing trace of size 2 to send-queue for %s string(33) "newly active :1735254072534978428" string(28) "initial :5052085463162682550" string(28) "started :7199227068870524257" @@ -88,8 +88,8 @@ baz() called bar() called string(28) "current :7199227068870524257" string(28) "closing :7199227068870524257" -[ddtrace] [info] Flushing trace of size 2 to send-queue for %s +[ddtrace] [info] [%d] Flushing trace of size 2 to send-queue for %s string(33) "newly active :5052085463162682550" foo() called -[ddtrace] [info] Flushing trace of size 5 to send-queue for %s -[ddtrace] [info] No finished traces to be sent to the agent \ No newline at end of file +[ddtrace] [info] [%d] Flushing trace of size 5 to send-queue for %s +[ddtrace] [info] [%d] No finished traces to be sent to the agent \ No newline at end of file diff --git a/tests/ext/sandbox/auto_flush.phpt b/tests/ext/sandbox/auto_flush.phpt index 75acececc96..146c5f22bba 100644 --- a/tests/ext/sandbox/auto_flush.phpt +++ b/tests/ext/sandbox/auto_flush.phpt @@ -32,14 +32,14 @@ echo PHP_EOL; --EXPECTF-- 3 6 -[ddtrace] [info] Flushing trace of size 3 to send-queue for %s +[ddtrace] [info] [%d] Flushing trace of size 3 to send-queue for %s 10 15 -[ddtrace] [info] Flushing trace of size 3 to send-queue for %s +[ddtrace] [info] [%d] Flushing trace of size 3 to send-queue for %s 21 28 -[ddtrace] [info] Flushing trace of size 3 to send-queue for %s +[ddtrace] [info] [%d] Flushing trace of size 3 to send-queue for %s -[ddtrace] [info] No finished traces to be sent to the agent \ No newline at end of file +[ddtrace] [info] [%d] No finished traces to be sent to the agent \ No newline at end of file diff --git a/tests/ext/sandbox/auto_flush_attach_exception.phpt b/tests/ext/sandbox/auto_flush_attach_exception.phpt index 7667c6b14bf..762675d7d3a 100644 --- a/tests/ext/sandbox/auto_flush_attach_exception.phpt +++ b/tests/ext/sandbox/auto_flush_attach_exception.phpt @@ -34,5 +34,5 @@ try { ?> --EXPECTF-- Caught exception: Oops! -[ddtrace] [info] Flushing trace of size 2 to send-queue for %s -[ddtrace] [info] No finished traces to be sent to the agent +[ddtrace] [info] [%d] Flushing trace of size 2 to send-queue for %s +[ddtrace] [info] [%d] No finished traces to be sent to the agent diff --git a/tests/ext/sandbox/auto_flush_disables_tracing.phpt b/tests/ext/sandbox/auto_flush_disables_tracing.phpt index 77af257affa..33a1771d804 100644 --- a/tests/ext/sandbox/auto_flush_disables_tracing.phpt +++ b/tests/ext/sandbox/auto_flush_disables_tracing.phpt @@ -37,14 +37,14 @@ echo PHP_EOL; --EXPECTF-- 3 6 -[ddtrace] [info] Flushing trace of size 3 to send-queue for %s +[ddtrace] [info] [%d] Flushing trace of size 3 to send-queue for %s 10 15 -[ddtrace] [info] Flushing trace of size 3 to send-queue for %s +[ddtrace] [info] [%d] Flushing trace of size 3 to send-queue for %s 21 28 -[ddtrace] [info] Flushing trace of size 3 to send-queue for %s +[ddtrace] [info] [%d] Flushing trace of size 3 to send-queue for %s -[ddtrace] [info] No finished traces to be sent to the agent \ No newline at end of file +[ddtrace] [info] [%d] No finished traces to be sent to the agent \ No newline at end of file diff --git a/tests/ext/sandbox/auto_flush_sandbox_exception.phpt b/tests/ext/sandbox/auto_flush_sandbox_exception.phpt index 6c1ccd43f91..d74f8562373 100644 --- a/tests/ext/sandbox/auto_flush_sandbox_exception.phpt +++ b/tests/ext/sandbox/auto_flush_sandbox_exception.phpt @@ -32,6 +32,6 @@ try { } ?> --EXPECTF-- -[ddtrace] [info] Flushing trace of size 1 to send-queue for %s +[ddtrace] [info] [%d] Flushing trace of size 1 to send-queue for %s Caught exception: Oops! -[ddtrace] [info] No finished traces to be sent to the agent +[ddtrace] [info] [%d] No finished traces to be sent to the agent diff --git a/tests/ext/sandbox/auto_flush_userland_root_span.phpt b/tests/ext/sandbox/auto_flush_userland_root_span.phpt index 5e14212401e..07812fc0cdd 100644 --- a/tests/ext/sandbox/auto_flush_userland_root_span.phpt +++ b/tests/ext/sandbox/auto_flush_userland_root_span.phpt @@ -32,16 +32,16 @@ echo PHP_EOL; 3 6 Has not flushed yet. -[ddtrace] [info] Flushing trace of size 3 to send-queue for %s +[ddtrace] [info] [%d] Flushing trace of size 3 to send-queue for %s 10 15 Has not flushed yet. -[ddtrace] [info] Flushing trace of size 3 to send-queue for %s +[ddtrace] [info] [%d] Flushing trace of size 3 to send-queue for %s 21 28 Has not flushed yet. -[ddtrace] [info] Flushing trace of size 3 to send-queue for %s +[ddtrace] [info] [%d] Flushing trace of size 3 to send-queue for %s -[ddtrace] [info] No finished traces to be sent to the agent \ No newline at end of file +[ddtrace] [info] [%d] No finished traces to be sent to the agent \ No newline at end of file diff --git a/tests/ext/sandbox/default_span_properties.phpt b/tests/ext/sandbox/default_span_properties.phpt index 94ab50530db..47ff97370f6 100644 --- a/tests/ext/sandbox/default_span_properties.phpt +++ b/tests/ext/sandbox/default_span_properties.phpt @@ -35,10 +35,10 @@ dd_dump_spans(); 28 spans(\DDTrace\SpanData) (1) { main (default_span_properties.php, main, cli) - _dd.code_origin.frames.0.file => %s/default_span_properties.php + _dd.code_origin.frames.0.file => %sdefault_span_properties.php _dd.code_origin.frames.0.line => 16 _dd.code_origin.frames.0.method => main - _dd.code_origin.frames.1.file => %s/default_span_properties.php + _dd.code_origin.frames.1.file => %sdefault_span_properties.php _dd.code_origin.frames.1.line => 21 _dd.code_origin.type => entry _dd.p.dm => -0 diff --git a/tests/ext/sandbox/deferred_load_attempt_loading_once.phpt b/tests/ext/sandbox/deferred_load_attempt_loading_once.phpt index fe11fa92de1..1d2c442da52 100644 --- a/tests/ext/sandbox/deferred_load_attempt_loading_once.phpt +++ b/tests/ext/sandbox/deferred_load_attempt_loading_once.phpt @@ -37,4 +37,4 @@ namespace autoload_attempted PUBLIC STATIC METHOD PUBLIC STATIC METHOD -[ddtrace] [info] Flushing trace of size 1 to send-queue for %s +[ddtrace] [info] [%d] Flushing trace of size 1 to send-queue for %s diff --git a/tests/ext/sandbox/deferred_load_fatal.phpt b/tests/ext/sandbox/deferred_load_fatal.phpt index 156ff31b03e..89e024bed49 100644 --- a/tests/ext/sandbox/deferred_load_fatal.phpt +++ b/tests/ext/sandbox/deferred_load_fatal.phpt @@ -33,6 +33,6 @@ namespace } ?> --EXPECTF-- -[ddtrace] [warning] Error raised in ddtrace's integration autoloader for ddtrace\test\testsandboxedintegration: Fatal! in %sdeferred_load_fatal.php on line %d +[ddtrace] [warning] [%d] Error raised in ddtrace's integration autoloader for ddtrace\test\testsandboxedintegration: Fatal! in %sdeferred_load_fatal.php on line %d PUBLIC STATIC METHOD PUBLIC STATIC METHOD diff --git a/tests/ext/sandbox/deferred_load_missing_interface.phpt b/tests/ext/sandbox/deferred_load_missing_interface.phpt index a280f799589..dd20564cad9 100644 --- a/tests/ext/sandbox/deferred_load_missing_interface.phpt +++ b/tests/ext/sandbox/deferred_load_missing_interface.phpt @@ -28,7 +28,7 @@ namespace Test::public_static_method(); } ?> ---EXPECT-- -[ddtrace] [warning] Error loading deferred integration ddtrace\test\testsandboxedintegration: Class is not an instance of DDTrace\Integration +--EXPECTF-- +[ddtrace] [warning] [%d] Error loading deferred integration ddtrace\test\testsandboxedintegration: Class is not an instance of DDTrace\Integration PUBLIC STATIC METHOD PUBLIC STATIC METHOD diff --git a/tests/ext/sandbox/die_in_sandbox.phpt b/tests/ext/sandbox/die_in_sandbox.phpt index 318f0467532..dea8d53cc7c 100644 --- a/tests/ext/sandbox/die_in_sandbox.phpt +++ b/tests/ext/sandbox/die_in_sandbox.phpt @@ -17,8 +17,8 @@ x(); ?> --EXPECTF-- -[ddtrace] [warning] UnwindExit thrown in ddtrace's closure defined at %s:%d for x(): in Unknown on line 0 -[ddtrace] [span] Encoding span: Span { service: die_in_sandbox.php, name: die_in_sandbox.php, resource: die_in_sandbox.php, type: cli, trace_id: %d, span_id: %d, parent_id: %d, start: %d, duration: %d, error: %d, meta: %s, metrics: %s, meta_struct: %s, span_links: %s, span_events: %s } -[ddtrace] [span] Encoding span: Span { service: die_in_sandbox.php, name: x, resource: x, type: cli, trace_id: %d, span_id: %d, parent_id: %d, start: %d, duration: %d, error: %d, meta: %s, metrics: %s, meta_struct: %s, span_links: %s, span_events: %s } -[ddtrace] [info] Flushing trace of size 2 to send-queue for %s +[ddtrace] [warning] [%d] UnwindExit thrown in ddtrace's closure defined at %s:%d for x(): in Unknown on line 0 +[ddtrace] [span] [%d] Encoding span: Span { service: die_in_sandbox.php, name: die_in_sandbox.php, resource: die_in_sandbox.php, type: cli, trace_id: %d, span_id: %d, parent_id: %d, start: %d, duration: %d, error: %d, meta: %s, metrics: %s, meta_struct: %s, span_links: %s, span_events: %s } +[ddtrace] [span] [%d] Encoding span: Span { service: die_in_sandbox.php, name: x, resource: x, type: cli, trace_id: %d, span_id: %d, parent_id: %d, start: %d, duration: %d, error: %d, meta: %s, metrics: %s, meta_struct: %s, span_links: %s, span_events: %s } +[ddtrace] [info] [%d] Flushing trace of size 2 to send-queue for %s diff --git a/tests/ext/sandbox/exception_error_log.phpt b/tests/ext/sandbox/exception_error_log.phpt index 465921a97df..6da3f0d707e 100644 --- a/tests/ext/sandbox/exception_error_log.phpt +++ b/tests/ext/sandbox/exception_error_log.phpt @@ -13,6 +13,6 @@ $sum = array_sum([1, 3, 5]); var_dump($sum); ?> --EXPECTF-- -[ddtrace] [warning] RuntimeException thrown in ddtrace's closure defined at %s:%d for array_sum(): This exception is expected in %s on line %d +[ddtrace] [warning] [%d] RuntimeException thrown in ddtrace's closure defined at %s:%d for array_sum(): This exception is expected in %s on line %d int(9) -[ddtrace] [info] Flushing trace of size 2 to send-queue for %s +[ddtrace] [info] [%d] Flushing trace of size 2 to send-queue for %s diff --git a/tests/ext/sandbox/exceptions_and_errors_are_ignored_in_tracing_closure.phpt b/tests/ext/sandbox/exceptions_and_errors_are_ignored_in_tracing_closure.phpt index 7fef0d5a192..6739e2ea8a1 100644 --- a/tests/ext/sandbox/exceptions_and_errors_are_ignored_in_tracing_closure.phpt +++ b/tests/ext/sandbox/exceptions_and_errors_are_ignored_in_tracing_closure.phpt @@ -46,12 +46,12 @@ array_map(function($span) { var_dump(error_get_last()); ?> --EXPECTF-- -[ddtrace] [warning] Exception thrown in ddtrace's closure defined at %s:21 for mt_srand(): This should be ignored in %s on line %d -[ddtrace] [warning] Error raised in ddtrace's closure defined at %s:26 for mt_rand(): htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s on line %d +[ddtrace] [warning] [%d] Exception thrown in ddtrace's closure defined at %s:21 for mt_srand(): This should be ignored in %s on line %d +[ddtrace] [warning] [%d] Error raised in ddtrace's closure defined at %s:26 for mt_rand(): htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s on line %d Test::testFoo() fav num: %d -[ddtrace] [warning] %s in ddtrace's closure defined at %s:16 for Test::testFoo(): Undefined variable%sthis_normally_raises_an_%s +[ddtrace] [warning] [%d] %s in ddtrace's closure defined at %s:16 for Test::testFoo(): Undefined variable%sthis_normally_raises_an_%s TestFoo MTRand MTSeed NULL -[ddtrace] [info] No finished traces to be sent to the agent +[ddtrace] [info] [%d] No finished traces to be sent to the agent diff --git a/tests/ext/sandbox/fatal_errors_ignored_in_shutdown.phpt b/tests/ext/sandbox/fatal_errors_ignored_in_shutdown.phpt index cf61084a20a..e24ae7f0eee 100644 --- a/tests/ext/sandbox/fatal_errors_ignored_in_shutdown.phpt +++ b/tests/ext/sandbox/fatal_errors_ignored_in_shutdown.phpt @@ -69,5 +69,5 @@ array_sum array_sum array_sum array_sum -[ddtrace] [warning] Error raised in ddtrace's closure defined at %s:%d for flushTracer(): Allowed memory size of 2097152 bytes exhausted %s in %s on line %d -[ddtrace] [info] No finished traces to be sent to the agent +[ddtrace] [warning] [%d] Error raised in ddtrace's closure defined at %s:%d for flushTracer(): Allowed memory size of 2097152 bytes exhausted %s in %s on line %d +[ddtrace] [info] [%d] No finished traces to be sent to the agent diff --git a/tests/ext/sandbox/fatal_errors_ignored_in_tracing_closure.phpt b/tests/ext/sandbox/fatal_errors_ignored_in_tracing_closure.phpt index 371e71fe636..38163c9aa1f 100644 --- a/tests/ext/sandbox/fatal_errors_ignored_in_tracing_closure.phpt +++ b/tests/ext/sandbox/fatal_errors_ignored_in_tracing_closure.phpt @@ -19,8 +19,8 @@ array_map(function($span) { var_dump(error_get_last()); ?> --EXPECTF-- -[ddtrace] [warning] Error thrown in ddtrace's closure defined at %s:%d for array_sum(): Call to undefined function this_function_does_not_exist() in %s on line %d +[ddtrace] [warning] [%d] Error thrown in ddtrace's closure defined at %s:%d for array_sum(): Call to undefined function this_function_does_not_exist() in %s on line %d int(100) array_sum NULL -[ddtrace] [info] No finished traces to be sent to the agent +[ddtrace] [info] [%d] No finished traces to be sent to the agent diff --git a/tests/ext/sandbox/hook_function/03.phpt b/tests/ext/sandbox/hook_function/03.phpt index e9b3d9028b2..bc2bc069910 100644 --- a/tests/ext/sandbox/hook_function/03.phpt +++ b/tests/ext/sandbox/hook_function/03.phpt @@ -17,7 +17,7 @@ greet('Datadog'); ?> --EXPECTF-- -[ddtrace] [warning] DDTrace\hook_function was given neither prehook nor posthook in %s on line %d; This message is only displayed once. Specify DD_TRACE_ONCE_LOGS=0 to show all messages. +[ddtrace] [warning] [%d] DDTrace\hook_function was given neither prehook nor posthook in %s on line %d; This message is only displayed once. Specify DD_TRACE_ONCE_LOGS=0 to show all messages. bool(false) Hello, Datadog. -[ddtrace] [info] Flushing trace of size 1 to send-queue for %s +[ddtrace] [info] [%d] Flushing trace of size 1 to send-queue for %s diff --git a/tests/ext/sandbox/hook_function/hook_does_not_leak_error.phpt b/tests/ext/sandbox/hook_function/hook_does_not_leak_error.phpt index 3cb5d3596f9..cd26d5d5238 100644 --- a/tests/ext/sandbox/hook_function/hook_does_not_leak_error.phpt +++ b/tests/ext/sandbox/hook_function/hook_does_not_leak_error.phpt @@ -29,8 +29,8 @@ foo(); ?> --EXPECTF-- foo -[ddtrace] [warning] Error raised in ddtrace's closure defined at %s:%d for foo(): Fatal in %s on line %d +[ddtrace] [warning] [%d] Error raised in ddtrace's closure defined at %s:%d for foo(): Fatal in %s on line %d int(200) foo -[ddtrace] [warning] Error raised in ddtrace's closure defined at %s:%d for foo(): Fatal in %s on line %d -[ddtrace] [info] Flushing trace of size %s +[ddtrace] [warning] [%d] Error raised in ddtrace's closure defined at %s:%d for foo(): Fatal in %s on line %d +[ddtrace] [info] [%d] Flushing trace of size %s diff --git a/tests/ext/sandbox/hook_function/posthook_error_02.phpt b/tests/ext/sandbox/hook_function/posthook_error_02.phpt index ba1c179460c..ebc2ecd55a7 100644 --- a/tests/ext/sandbox/hook_function/posthook_error_02.phpt +++ b/tests/ext/sandbox/hook_function/posthook_error_02.phpt @@ -27,5 +27,5 @@ greet('Datadog'); --EXPECTF-- Hello, Datadog. greet hooked. -[ddtrace] [warning] %s in ddtrace's closure defined at %s:%d for greet(): Undefined variable%sthis_normally_raises_an_%s -[ddtrace] [info] Flushing trace of size 1 to send-queue for %s +[ddtrace] [warning] [%d] %s in ddtrace's closure defined at %s:%d for greet(): Undefined variable%sthis_normally_raises_an_%s +[ddtrace] [info] [%d] Flushing trace of size 1 to send-queue for %s diff --git a/tests/ext/sandbox/hook_function/posthook_exceptions_04.phpt b/tests/ext/sandbox/hook_function/posthook_exceptions_04.phpt index c29a1bcdc0f..1b345fcfde8 100644 --- a/tests/ext/sandbox/hook_function/posthook_exceptions_04.phpt +++ b/tests/ext/sandbox/hook_function/posthook_exceptions_04.phpt @@ -30,6 +30,6 @@ try { ?> --EXPECTF-- array_sum hooked. -[ddtrace] [warning] Exception thrown in ddtrace's closure defined at %s:%d for array_sum(): ! in %s on line %d +[ddtrace] [warning] [%d] Exception thrown in ddtrace's closure defined at %s:%d for array_sum(): ! in %s on line %d Sum = 4. -[ddtrace] [info] Flushing trace of size 1 to send-queue for %s +[ddtrace] [info] [%d] Flushing trace of size 1 to send-queue for %s diff --git a/tests/ext/sandbox/hook_function/prehook_error_02.phpt b/tests/ext/sandbox/hook_function/prehook_error_02.phpt index b666de25a26..5b07a34fea6 100644 --- a/tests/ext/sandbox/hook_function/prehook_error_02.phpt +++ b/tests/ext/sandbox/hook_function/prehook_error_02.phpt @@ -25,6 +25,6 @@ greet('Datadog'); ?> --EXPECTF-- greet hooked. -[ddtrace] [warning] %s in ddtrace's closure defined at %s:%d for greet(): Undefined variable%sthis_normally_raises_an_%s +[ddtrace] [warning] [%d] %s in ddtrace's closure defined at %s:%d for greet(): Undefined variable%sthis_normally_raises_an_%s Hello, Datadog. -[ddtrace] [info] Flushing trace of size 1 to send-queue for %s +[ddtrace] [info] [%d] Flushing trace of size 1 to send-queue for %s diff --git a/tests/ext/sandbox/hook_function/prehook_exceptions_02.phpt b/tests/ext/sandbox/hook_function/prehook_exceptions_02.phpt index cf294a832f7..c4eca6d7586 100644 --- a/tests/ext/sandbox/hook_function/prehook_exceptions_02.phpt +++ b/tests/ext/sandbox/hook_function/prehook_exceptions_02.phpt @@ -32,7 +32,7 @@ try { ?> --EXPECTF-- greet hooked. -[ddtrace] [warning] Exception thrown in ddtrace's closure defined at %s:%d for greet(): ! in %s on line %d +[ddtrace] [warning] [%d] Exception thrown in ddtrace's closure defined at %s:%d for greet(): ! in %s on line %d Hello, Datadog. Done. -[ddtrace] [info] Flushing trace of size 1 to send-queue for %s +[ddtrace] [info] [%d] Flushing trace of size 1 to send-queue for %s diff --git a/tests/ext/sandbox/hook_function/prehook_exceptions_04.phpt b/tests/ext/sandbox/hook_function/prehook_exceptions_04.phpt index 83b47421634..b643afd6661 100644 --- a/tests/ext/sandbox/hook_function/prehook_exceptions_04.phpt +++ b/tests/ext/sandbox/hook_function/prehook_exceptions_04.phpt @@ -28,6 +28,6 @@ try { ?> --EXPECTF-- array_sum hooked. -[ddtrace] [warning] Exception thrown in ddtrace's closure defined at %s:%d for array_sum(): ! in %s on line %d +[ddtrace] [warning] [%d] Exception thrown in ddtrace's closure defined at %s:%d for array_sum(): ! in %s on line %d Sum = 4. -[ddtrace] [info] Flushing trace of size 1 to send-queue for %s +[ddtrace] [info] [%d] Flushing trace of size 1 to send-queue for %s diff --git a/tests/ext/sandbox/hook_limit.phpt b/tests/ext/sandbox/hook_limit.phpt index 695f1f721fc..667a4b73af6 100644 --- a/tests/ext/sandbox/hook_limit.phpt +++ b/tests/ext/sandbox/hook_limit.phpt @@ -22,8 +22,8 @@ print "foo hooks were $invocations times invoked\n"; ?> --EXPECTF-- -[ddtrace] [error] Could not add hook to foo with more than datadog.trace.hook_limit = 2 installed hooks in %s on line %d; This message is only displayed once. Specify DD_TRACE_ONCE_LOGS=0 to show all messages. +[ddtrace] [error] [%d] Could not add hook to foo with more than datadog.trace.hook_limit = 2 installed hooks in %s on line %d; This message is only displayed once. Specify DD_TRACE_ONCE_LOGS=0 to show all messages. bool(false) -[ddtrace] [error] Could not add hook to foo with more than datadog.trace.hook_limit = 2 installed hooks in %s on line %d; This message is only displayed once. Specify DD_TRACE_ONCE_LOGS=0 to show all messages. +[ddtrace] [error] [%d] Could not add hook to foo with more than datadog.trace.hook_limit = 2 installed hooks in %s on line %d; This message is only displayed once. Specify DD_TRACE_ONCE_LOGS=0 to show all messages. int(0) foo hooks were 2 times invoked diff --git a/tests/ext/sandbox/hook_method/03.phpt b/tests/ext/sandbox/hook_method/03.phpt index 0575753d78f..2f47e493ca9 100644 --- a/tests/ext/sandbox/hook_method/03.phpt +++ b/tests/ext/sandbox/hook_method/03.phpt @@ -20,7 +20,7 @@ Greeter::greet('Datadog'); ?> --EXPECTF-- -[ddtrace] [warning] DDTrace\hook_method was given neither prehook nor posthook in %s on line %d; This message is only displayed once. Specify DD_TRACE_ONCE_LOGS=0 to show all messages. +[ddtrace] [warning] [%d] DDTrace\hook_method was given neither prehook nor posthook in %s on line %d; This message is only displayed once. Specify DD_TRACE_ONCE_LOGS=0 to show all messages. bool(false) Hello, Datadog. -[ddtrace] [info] Flushing trace of size 1 to send-queue for %s +[ddtrace] [info] [%d] Flushing trace of size 1 to send-queue for %s diff --git a/tests/ext/sandbox/hook_method/posthook_07.phpt b/tests/ext/sandbox/hook_method/posthook_07.phpt index ef534c365dd..aa1f72f0bb2 100644 --- a/tests/ext/sandbox/hook_method/posthook_07.phpt +++ b/tests/ext/sandbox/hook_method/posthook_07.phpt @@ -57,4 +57,4 @@ $app->run(); App::__construct hooked. App::run App::run traced. -[ddtrace] [info] Flushing trace of size 2 to send-queue for %s +[ddtrace] [info] [%d] Flushing trace of size 2 to send-queue for %s diff --git a/tests/ext/sandbox/hook_method/posthook_error_02.phpt b/tests/ext/sandbox/hook_method/posthook_error_02.phpt index a7258b9f390..b206252922a 100644 --- a/tests/ext/sandbox/hook_method/posthook_error_02.phpt +++ b/tests/ext/sandbox/hook_method/posthook_error_02.phpt @@ -30,5 +30,5 @@ Greeter::greet('Datadog'); --EXPECTF-- Hello, Datadog. Greeter::greet hooked. -[ddtrace] [warning] %s in ddtrace's closure defined at %s:%d for Greeter::greet(): Undefined variable%sthis_normally_raises_an_%s -[ddtrace] [info] Flushing trace of size 1 to send-queue for %s +[ddtrace] [warning] [%d] %s in ddtrace's closure defined at %s:%d for Greeter::greet(): Undefined variable%sthis_normally_raises_an_%s +[ddtrace] [info] [%d] Flushing trace of size 1 to send-queue for %s diff --git a/tests/ext/sandbox/hook_method/prehook_error_02.phpt b/tests/ext/sandbox/hook_method/prehook_error_02.phpt index b53a838076a..8560f29d75b 100644 --- a/tests/ext/sandbox/hook_method/prehook_error_02.phpt +++ b/tests/ext/sandbox/hook_method/prehook_error_02.phpt @@ -29,6 +29,6 @@ Greeter::greet('Datadog'); ?> --EXPECTF-- Greeter::greet hooked. -[ddtrace] [warning] %s in ddtrace's closure defined at %s:%d for Greeter::greet(): Undefined variable%sthis_normally_raises_an_%s +[ddtrace] [warning] [%d] %s in ddtrace's closure defined at %s:%d for Greeter::greet(): Undefined variable%sthis_normally_raises_an_%s Hello, Datadog. -[ddtrace] [info] Flushing trace of size 1 to send-queue for %s +[ddtrace] [info] [%d] Flushing trace of size 1 to send-queue for %s diff --git a/tests/ext/sandbox/hook_method/prehook_exceptions_02.phpt b/tests/ext/sandbox/hook_method/prehook_exceptions_02.phpt index c56a97a33f1..cad41da9e1b 100644 --- a/tests/ext/sandbox/hook_method/prehook_exceptions_02.phpt +++ b/tests/ext/sandbox/hook_method/prehook_exceptions_02.phpt @@ -33,7 +33,7 @@ try { ?> --EXPECTF-- Greeter::greet hooked. -[ddtrace] [warning] Exception thrown in ddtrace's closure defined at %s:%d for Greeter::greet(): ! in %s on line %d +[ddtrace] [warning] [%d] Exception thrown in ddtrace's closure defined at %s:%d for Greeter::greet(): ! in %s on line %d Hello, Datadog. Done. -[ddtrace] [info] Flushing trace of size 1 to send-queue for %s +[ddtrace] [info] [%d] Flushing trace of size 1 to send-queue for %s diff --git a/tests/ext/sandbox/install_hook/hook_file.phpt b/tests/ext/sandbox/install_hook/hook_file.phpt index ef00df5c999..ac8ba9a1769 100644 --- a/tests/ext/sandbox/install_hook/hook_file.phpt +++ b/tests/ext/sandbox/install_hook/hook_file.phpt @@ -22,7 +22,7 @@ echo include "testinclude.inc", "\n"; ?> --EXPECTF-- -[ddtrace] [error] Could not add hook to file path ../testinclude.inc, could not resolve path in %s on line %d; This message is only displayed once. Specify DD_TRACE_ONCE_LOGS=0 to show all messages. +[ddtrace] [error] [%d] Could not add hook to file path ../testinclude.inc, could not resolve path in %s on line %d; This message is only displayed once. Specify DD_TRACE_ONCE_LOGS=0 to show all messages. %sinstall_hook/testinclude.inc: %s/install_hook/testinclude.inc, ret: test ./testinclude.inc: %s/install_hook/testinclude.inc, ret: test testinclude.inc: %s/install_hook/testinclude.inc, ret: test diff --git a/tests/ext/sandbox/install_hook/install_hook_return_by_ref.phpt b/tests/ext/sandbox/install_hook/install_hook_return_by_ref.phpt index 8d74b8aa3a3..3c05da93636 100644 --- a/tests/ext/sandbox/install_hook/install_hook_return_by_ref.phpt +++ b/tests/ext/sandbox/install_hook/install_hook_return_by_ref.phpt @@ -41,9 +41,9 @@ var_dump(A::$var); --EXPECTF-- int(2) int(2) -[ddtrace] [warning] TypeError thrown in ddtrace's closure defined at %s:%d for ref(): Cannot assign string to reference held by property A::$var of type ?int in %s on line %d +[ddtrace] [warning] [%d] TypeError thrown in ddtrace's closure defined at %s:%d for ref(): Cannot assign string to reference held by property A::$var of type ?int in %s on line %d int(3) int(3) NULL NULL -[ddtrace] [info] No finished traces to be sent to the agent +[ddtrace] [info] [%d] No finished traces to be sent to the agent diff --git a/tests/ext/sandbox/install_hook/replace_hook_args.phpt b/tests/ext/sandbox/install_hook/replace_hook_args.phpt index 756a7b2f3f1..2e5d9f8f474 100644 --- a/tests/ext/sandbox/install_hook/replace_hook_args.phpt +++ b/tests/ext/sandbox/install_hook/replace_hook_args.phpt @@ -59,19 +59,19 @@ Array [2] => 7 [3] => 8 ) -[ddtrace] [error] Cannot set more args than provided: got too many arguments for hook in %s on line %d; This message is only displayed once. Specify DD_TRACE_ONCE_LOGS=0 to show all messages. +[ddtrace] [error] [%d] Cannot set more args than provided: got too many arguments for hook in %s on line %d; This message is only displayed once. Specify DD_TRACE_ONCE_LOGS=0 to show all messages. Array ( [0] => 1 [1] => 2 ) -[ddtrace] [error] Not enough args provided for hook in %s on line %d; This message is only displayed once. Specify DD_TRACE_ONCE_LOGS=0 to show all messages. +[ddtrace] [error] [%d] Not enough args provided for hook in %s on line %d; This message is only displayed once. Specify DD_TRACE_ONCE_LOGS=0 to show all messages. Array ( [0] => 1 [1] => 2 ) -[ddtrace] [error] Can't pass less args to an untyped function than originally passed (minus extra args) in %s on line %d; This message is only displayed once. Specify DD_TRACE_ONCE_LOGS=0 to show all messages. +[ddtrace] [error] [%d] Can't pass less args to an untyped function than originally passed (minus extra args) in %s on line %d; This message is only displayed once. Specify DD_TRACE_ONCE_LOGS=0 to show all messages. Array ( [0] => 1 diff --git a/tests/ext/sandbox/manual_flush.phpt b/tests/ext/sandbox/manual_flush.phpt index 4ac704754cb..ba000554ff8 100644 --- a/tests/ext/sandbox/manual_flush.phpt +++ b/tests/ext/sandbox/manual_flush.phpt @@ -21,5 +21,5 @@ main(); ?> --EXPECTF-- -[ddtrace] [info] Flushing trace of size 1 to send-queue for %s -[ddtrace] [info] Flushing trace of size 1 to send-queue for %s +[ddtrace] [info] [%d] Flushing trace of size 1 to send-queue for %s +[ddtrace] [info] [%d] Flushing trace of size 1 to send-queue for %s diff --git a/tests/ext/sandbox/retval_is_null_with_exception.phpt b/tests/ext/sandbox/retval_is_null_with_exception.phpt index 415ac6c657a..be69b90dbb6 100644 --- a/tests/ext/sandbox/retval_is_null_with_exception.phpt +++ b/tests/ext/sandbox/retval_is_null_with_exception.phpt @@ -31,4 +31,4 @@ try { bool(true) NULL Oops! -[ddtrace] [info] Flushing trace of size 2 to send-queue for %s +[ddtrace] [info] [%d] Flushing trace of size 2 to send-queue for %s diff --git a/tests/ext/sandbox/spans_out_of_sync_01.phpt b/tests/ext/sandbox/spans_out_of_sync_01.phpt index 49f5e82d011..70825cb7e88 100644 --- a/tests/ext/sandbox/spans_out_of_sync_01.phpt +++ b/tests/ext/sandbox/spans_out_of_sync_01.phpt @@ -16,9 +16,9 @@ var_dump(dd_trace_serialize_closed_spans()); echo 'Done.' . PHP_EOL; ?> ---EXPECT-- -[ddtrace] [error] Cannot run tracing closure for dd_trace_serialize_closed_spans(); spans out of sync; This message is only displayed once. Specify DD_TRACE_ONCE_LOGS=0 to show all messages. +--EXPECTF-- +[ddtrace] [error] [%d] Cannot run tracing closure for dd_trace_serialize_closed_spans(); spans out of sync; This message is only displayed once. Specify DD_TRACE_ONCE_LOGS=0 to show all messages. array(0) { } Done. -[ddtrace] [info] No finished traces to be sent to the agent +[ddtrace] [info] [%d] No finished traces to be sent to the agent diff --git a/tests/ext/sandbox/spans_out_of_sync_02.phpt b/tests/ext/sandbox/spans_out_of_sync_02.phpt index e9f54330f18..b0f949b2d87 100644 --- a/tests/ext/sandbox/spans_out_of_sync_02.phpt +++ b/tests/ext/sandbox/spans_out_of_sync_02.phpt @@ -15,9 +15,9 @@ var_dump(dd_trace_serialize_closed_spans()); echo 'Done.' . PHP_EOL; ?> ---EXPECT-- -[ddtrace] [error] Cannot run tracing closure for dd_trace_serialize_closed_spans(); spans out of sync; This message is only displayed once. Specify DD_TRACE_ONCE_LOGS=0 to show all messages. +--EXPECTF-- +[ddtrace] [error] [%d] Cannot run tracing closure for dd_trace_serialize_closed_spans(); spans out of sync; This message is only displayed once. Specify DD_TRACE_ONCE_LOGS=0 to show all messages. array(0) { } Done. -[ddtrace] [info] No finished traces to be sent to the agent +[ddtrace] [info] [%d] No finished traces to be sent to the agent diff --git a/tests/ext/sandbox/spans_out_of_sync_03.phpt b/tests/ext/sandbox/spans_out_of_sync_03.phpt index 2e361c07140..59f8162b59e 100644 --- a/tests/ext/sandbox/spans_out_of_sync_03.phpt +++ b/tests/ext/sandbox/spans_out_of_sync_03.phpt @@ -19,9 +19,9 @@ shutdown_and_flush(); echo 'Done.' . PHP_EOL; ?> ---EXPECT-- +--EXPECTF-- array(0) { } -[ddtrace] [error] Cannot run tracing closure for shutdown_and_flush(); spans out of sync; This message is only displayed once. Specify DD_TRACE_ONCE_LOGS=0 to show all messages. +[ddtrace] [error] [%d] Cannot run tracing closure for shutdown_and_flush(); spans out of sync; This message is only displayed once. Specify DD_TRACE_ONCE_LOGS=0 to show all messages. Done. -[ddtrace] [info] No finished traces to be sent to the agent +[ddtrace] [info] [%d] No finished traces to be sent to the agent diff --git a/tests/ext/sandbox/spans_out_of_sync_04.phpt b/tests/ext/sandbox/spans_out_of_sync_04.phpt index 5a1bbc471c9..ce7480231be 100644 --- a/tests/ext/sandbox/spans_out_of_sync_04.phpt +++ b/tests/ext/sandbox/spans_out_of_sync_04.phpt @@ -18,9 +18,9 @@ shutdown_and_flush(); echo 'Done.' . PHP_EOL; ?> ---EXPECT-- +--EXPECTF-- array(0) { } -[ddtrace] [error] Cannot run tracing closure for shutdown_and_flush(); spans out of sync; This message is only displayed once. Specify DD_TRACE_ONCE_LOGS=0 to show all messages. +[ddtrace] [error] [%d] Cannot run tracing closure for shutdown_and_flush(); spans out of sync; This message is only displayed once. Specify DD_TRACE_ONCE_LOGS=0 to show all messages. Done. -[ddtrace] [info] No finished traces to be sent to the agent +[ddtrace] [info] [%d] No finished traces to be sent to the agent diff --git a/tests/ext/sandbox/spans_out_of_sync_05.phpt b/tests/ext/sandbox/spans_out_of_sync_05.phpt index 2e1506153dd..1c1096105f9 100644 --- a/tests/ext/sandbox/spans_out_of_sync_05.phpt +++ b/tests/ext/sandbox/spans_out_of_sync_05.phpt @@ -19,6 +19,6 @@ shutdown_and_flush(); echo 'Done.' . PHP_EOL; ?> ---EXPECT-- +--EXPECTF-- Done. -[ddtrace] [info] No finished traces to be sent to the agent +[ddtrace] [info] [%d] No finished traces to be sent to the agent diff --git a/tests/ext/sandbox/spans_out_of_sync_06.phpt b/tests/ext/sandbox/spans_out_of_sync_06.phpt index 17e2f9dca4a..f8d91922a5a 100644 --- a/tests/ext/sandbox/spans_out_of_sync_06.phpt +++ b/tests/ext/sandbox/spans_out_of_sync_06.phpt @@ -17,6 +17,6 @@ shutdown_and_flush(); echo 'Done.' . PHP_EOL; ?> ---EXPECT-- +--EXPECTF-- Done. -[ddtrace] [info] No finished traces to be sent to the agent +[ddtrace] [info] [%d] No finished traces to be sent to the agent diff --git a/tests/ext/sandbox/static_tracing_closures_will_not_bind_this.phpt b/tests/ext/sandbox/static_tracing_closures_will_not_bind_this.phpt index 56a02c556f5..a7061957653 100644 --- a/tests/ext/sandbox/static_tracing_closures_will_not_bind_this.phpt +++ b/tests/ext/sandbox/static_tracing_closures_will_not_bind_this.phpt @@ -25,4 +25,4 @@ $foo->test(); --EXPECTF-- Foo::test() TRACED Foo::test() -[ddtrace] [info] Flushing trace of size 2 to send-queue for %s +[ddtrace] [info] [%d] Flushing trace of size 2 to send-queue for %s diff --git a/tests/ext/span_on_close.phpt b/tests/ext/span_on_close.phpt index ce519454054..a58461fa4e3 100644 --- a/tests/ext/span_on_close.phpt +++ b/tests/ext/span_on_close.phpt @@ -26,8 +26,8 @@ $span->onClose = [ --EXPECTF-- Second First -[ddtrace] [span] Encoding span: Span { service: %s, name: root span, resource: root span, type: cli, trace_id: %d, span_id: %d, parent_id: %d, start: %d, duration: %d, error: %d, meta: %s, metrics: %s, meta_struct: %s, span_links: %s, span_events: %s } -[ddtrace] [span] Encoding span: Span { service: %s, name: inner span, resource: datadogs are awesome, type: cli, trace_id: %d, span_id: %d, parent_id: %d, start: %d, duration: %d, error: %d, meta: %s, metrics: %s, meta_struct: %s, span_links: %s, span_events: %s } -[ddtrace] [info] Flushing trace of size 2 to send-queue for %s -[ddtrace] [info] No finished traces to be sent to the agent +[ddtrace] [span] [%d] Encoding span: Span { service: %s, name: root span, resource: root span, type: cli, trace_id: %d, span_id: %d, parent_id: %d, start: %d, duration: %d, error: %d, meta: %s, metrics: %s, meta_struct: %s, span_links: %s, span_events: %s } +[ddtrace] [span] [%d] Encoding span: Span { service: %s, name: inner span, resource: datadogs are awesome, type: cli, trace_id: %d, span_id: %d, parent_id: %d, start: %d, duration: %d, error: %d, meta: %s, metrics: %s, meta_struct: %s, span_links: %s, span_events: %s } +[ddtrace] [info] [%d] Flushing trace of size 2 to send-queue for %s +[ddtrace] [info] [%d] No finished traces to be sent to the agent diff --git a/tests/ext/span_stack/start_top_level_span_stack.phpt b/tests/ext/span_stack/start_top_level_span_stack.phpt index bc87fe93ca3..4552b54f28f 100644 --- a/tests/ext/span_stack/start_top_level_span_stack.phpt +++ b/tests/ext/span_stack/start_top_level_span_stack.phpt @@ -39,7 +39,7 @@ That top-level span is, in fact a trace root span without parent: bool(true) And it has matching a trace id: bool(true) Verify the stack_span stays if the top-level span is closed - this span stack is not tied to a trace directly: bool(true) There is no active span now: bool(true) -[ddtrace] [error] There is no user-span on the top of the stack. Cannot close. +[ddtrace] [error] [%d] There is no user-span on the top of the stack. Cannot close. Given no active span, the active span stays null: bool(true) This also must not affect the active span stack: bool(true) Now, we are back on the global span stack: bool(true) diff --git a/tests/ext/start_span_without_closing.phpt b/tests/ext/start_span_without_closing.phpt index b7815743b00..374ee12e727 100644 --- a/tests/ext/start_span_without_closing.phpt +++ b/tests/ext/start_span_without_closing.phpt @@ -26,7 +26,7 @@ var_dump(dd_trace_serialize_closed_spans()); ?> --EXPECTF-- -[ddtrace] [warning] Found unfinished span while automatically closing spans with name 'my precious span' +[ddtrace] [warning] [%d] Found unfinished span while automatically closing spans with name 'my precious span' array(1) { [0]=> array(10) { @@ -72,7 +72,7 @@ array(1) { } } } -[ddtrace] [error] There is no user-span on the top of the stack. Cannot close. +[ddtrace] [error] [%d] There is no user-span on the top of the stack. Cannot close. array(0) { } -[ddtrace] [info] No finished traces to be sent to the agent +[ddtrace] [info] [%d] No finished traces to be sent to the agent diff --git a/tests/ext/start_span_without_closing_autofinish.phpt b/tests/ext/start_span_without_closing_autofinish.phpt index 4327faf24e6..e299942aba0 100644 --- a/tests/ext/start_span_without_closing_autofinish.phpt +++ b/tests/ext/start_span_without_closing_autofinish.phpt @@ -24,7 +24,7 @@ var_dump(dd_trace_serialize_closed_spans()); ?> --EXPECTF-- -[ddtrace] [warning] Found unfinished span while automatically closing spans with name 'my precious span' +[ddtrace] [warning] [%d] Found unfinished span while automatically closing spans with name 'my precious span' array(2) { [0]=> array(9) { @@ -69,7 +69,7 @@ array(2) { string(3) "cli" } } -[ddtrace] [error] There is no user-span on the top of the stack. Cannot close. +[ddtrace] [error] [%d] There is no user-span on the top of the stack. Cannot close. array(0) { } -[ddtrace] [info] No finished traces to be sent to the agent +[ddtrace] [info] [%d] No finished traces to be sent to the agent diff --git a/tests/ext/telemetry/broken_pipe.phpt b/tests/ext/telemetry/broken_pipe.phpt index 87cc6f4ce30..425770418ca 100644 --- a/tests/ext/telemetry/broken_pipe.phpt +++ b/tests/ext/telemetry/broken_pipe.phpt @@ -29,11 +29,12 @@ dd_trace_serialize_closed_spans(); // force a reconnect, it needs to resubmit telemetry info dd_trace_internal_fn("break_sidecar_connection"); +dd_trace_internal_fn("stats_sidecar"); // await connection breaking dd_trace_internal_fn("finalize_telemetry"); for ($i = 0; $i < 300; ++$i) { - usleep(100000); + ("us" . "leep")(100000); if (file_exists(__DIR__ . '/broken_pipe-telemetry.out')) { $batches = []; foreach (file(__DIR__ . '/broken_pipe-telemetry.out') as $l) { @@ -64,17 +65,20 @@ for ($i = 0; $i < 300; ++$i) { } } } +if ($i == 300) { + var_dump(file(__DIR__ . '/broken_pipe-telemetry.out')); +} ?> --EXPECTF-- -[ddtrace] [info] Flushing trace of size 1 to send-queue for %sbroken_pipe-telemetry.out -[ddtrace] [datadog_sidecar::service::blocking] The sidecar transport is closed. Reconnecting... This generally indicates a problem with the sidecar, most likely a crash. Check the logs / core dump locations and possibly report a bug. +[ddtrace] [info] [%d] Flushing trace of size 1 to send-queue for %sbroken_pipe-telemetry.out%A +[ddtrace] [datadog_sidecar::service::blocking] [%d] The sidecar transport is closed. Reconnecting... This generally indicates a problem with the sidecar, most likely a crash. Check the logs / core dump locations and possibly report a bug. string(11) "app-started" string(25) "broken_pipe-telemetry-app" string(8) "test-env" string(31) "app-client-configuration-change" string(11) "app-closing" -[ddtrace] [info] No finished traces to be sent to the agent +[ddtrace] [info] [%d] No finished traces to be sent to the agent --CLEAN-- --EXPECTF-- diff --git a/tests/ext/telemetry/config.phpt b/tests/ext/telemetry/config.phpt index a0a9df0e9c2..08908d9a27b 100644 --- a/tests/ext/telemetry/config.phpt +++ b/tests/ext/telemetry/config.phpt @@ -38,7 +38,7 @@ dd_trace_serialize_closed_spans(); dd_trace_internal_fn("finalize_telemetry"); for ($i = 0; $i < 300; ++$i) { - usleep(100000); + ("us" . "leep")(100000); if (file_exists(__DIR__ . '/config-telemetry.out')) { foreach (file(__DIR__ . '/config-telemetry.out') as $l) { if ($l) { @@ -63,6 +63,9 @@ for ($i = 0; $i < 300; ++$i) { } } } +if ($i == 300) { + var_dump(file(__DIR__ . '/config-telemetry.out')); +} ?> --EXPECTF-- diff --git a/tests/ext/telemetry/integration.phpt b/tests/ext/telemetry/integration.phpt index b8e08aecff7..3405c58b4c5 100644 --- a/tests/ext/telemetry/integration.phpt +++ b/tests/ext/telemetry/integration.phpt @@ -45,7 +45,7 @@ namespace dd_trace_internal_fn("finalize_telemetry"); for ($i = 0; $i < 300; ++$i) { - usleep(100000); + ("us" . "leep")(100000); if (file_exists(__DIR__ . '/integration-telemetry.out')) { foreach (file(__DIR__ . '/integration-telemetry.out') as $l) { if ($l) { @@ -61,6 +61,9 @@ namespace } } } + if ($i == 300) { + var_dump(file(__DIR__ . '/integration-telemetry.out')); + } } ?> diff --git a/tests/ext/telemetry/integration_runtime_error.phpt b/tests/ext/telemetry/integration_runtime_error.phpt index ec9c53c8946..3a8a03aa35c 100644 --- a/tests/ext/telemetry/integration_runtime_error.phpt +++ b/tests/ext/telemetry/integration_runtime_error.phpt @@ -36,7 +36,7 @@ foo(); dd_trace_internal_fn("finalize_telemetry"); for ($i = 0; $i < 300; ++$i) { - usleep(100000); + ("us" . "leep")(100000); if (file_exists(__DIR__ . '/integration-runtime-error-telemetry.out')) { foreach (file(__DIR__ . '/integration-runtime-error-telemetry.out') as $l) { if ($l) { @@ -54,16 +54,19 @@ for ($i = 0; $i < 300; ++$i) { } } } + if ($i == 300) { + var_dump(file(__DIR__ . '/integration-runtime-error-telemetry.out')); + } } ?> --EXPECTF-- foo -[ddtrace] [warning] Error raised in ddtrace's closure defined at %sintegration_runtime_error.php:12 for foo(): Testnotice in %sintegration_runtime_error.php on line 13 -[ddtrace] [warning] Exception thrown in ddtrace's closure defined at %sintegration_runtime_error.php:7 for foo(): test in %sintegration_runtime_error.php on line 9 +[ddtrace] [warning] [%d] Error raised in ddtrace's closure defined at %sintegration_runtime_error.php:12 for foo(): Testnotice in %sintegration_runtime_error.php on line 13 +[ddtrace] [warning] [%d] Exception thrown in ddtrace's closure defined at %sintegration_runtime_error.php:7 for foo(): test in %sintegration_runtime_error.php on line 9 foo -[ddtrace] [warning] Error raised in ddtrace's closure defined at %sintegration_runtime_error.php:12 for foo(): Testnotice in %sintegration_runtime_error.php on line 13 -[ddtrace] [warning] Exception thrown in ddtrace's closure defined at %sintegration_runtime_error.php:7 for foo(): test in %sintegration_runtime_error.php on line 9 +[ddtrace] [warning] [%d] Error raised in ddtrace's closure defined at %sintegration_runtime_error.php:12 for foo(): Testnotice in %sintegration_runtime_error.php on line 13 +[ddtrace] [warning] [%d] Exception thrown in ddtrace's closure defined at %sintegration_runtime_error.php:7 for foo(): test in %sintegration_runtime_error.php on line 9 array(2) { [0]=> array(7) { diff --git a/tests/ext/telemetry/metrics_logs_created.phpt b/tests/ext/telemetry/metrics_logs_created.phpt index c219c066bdc..16fb8bd8768 100644 --- a/tests/ext/telemetry/metrics_logs_created.phpt +++ b/tests/ext/telemetry/metrics_logs_created.phpt @@ -21,7 +21,7 @@ dd_trace_internal_fn("test_logs"); dd_trace_internal_fn("finalize_telemetry"); for ($i = 0; $i < 300; ++$i) { - usleep(100000); + ("us" . "leep")(100000); if (file_exists(__DIR__ . '/metrics-logs-created-telemetry.out')) { foreach (file(__DIR__ . '/metrics-logs-created-telemetry.out') as $l) { if ($l) { @@ -49,13 +49,16 @@ for ($i = 0; $i < 300; ++$i) { } } } + if ($i == 300) { + var_dump(file(__DIR__ . '/metrics-logs-created-telemetry.out')); + } } ?> --EXPECTF-- -[ddtrace] [warning] foo -[ddtrace] [warning] bar -[ddtrace] [error] Boum +[ddtrace] [warning] [%d] foo +[ddtrace] [warning] [%d] bar +[ddtrace] [error] [%d] Boum array(2) { [0]=> array(7) { diff --git a/tests/ext/telemetry/metrics_spans_created.phpt b/tests/ext/telemetry/metrics_spans_created.phpt index 431168ebedd..cf45f052ccc 100644 --- a/tests/ext/telemetry/metrics_spans_created.phpt +++ b/tests/ext/telemetry/metrics_spans_created.phpt @@ -81,7 +81,7 @@ namespace dd_trace_internal_fn("finalize_telemetry"); for ($i = 0; $i < 300; ++$i) { - usleep(100000); + ("us" . "leep")(100000); if (file_exists(__DIR__ . '/metrics-spans_created-telemetry.out')) { foreach (file(__DIR__ . '/metrics-spans_created-telemetry.out') as $l) { if ($l) { @@ -110,6 +110,9 @@ namespace } } } + if ($i == 300) { + var_dump(file(__DIR__ . '/metrics-spans_created-telemetry.out')); + } } ?> diff --git a/tests/ext/telemetry/simple.phpt b/tests/ext/telemetry/simple.phpt index 68a1845ecc9..2279f460f56 100644 --- a/tests/ext/telemetry/simple.phpt +++ b/tests/ext/telemetry/simple.phpt @@ -29,7 +29,7 @@ dd_trace_serialize_closed_spans(); dd_trace_internal_fn("finalize_telemetry"); for ($i = 0; $i < 300; ++$i) { - usleep(100000); + ("us" . "leep")(100000); if (file_exists(__DIR__ . '/simple-telemetry.out')) { $batches = []; foreach (file(__DIR__ . '/simple-telemetry.out') as $l) { @@ -59,6 +59,9 @@ for ($i = 0; $i < 300; ++$i) { } } } +if ($i == 300) { + var_dump(file(__DIR__ . '/simple-telemetry.out')); +} ?> --EXPECT-- diff --git a/tests/ext/telemetry/telemetry_process_tags.phpt b/tests/ext/telemetry/telemetry_process_tags.phpt index 306a8204b08..3ea2bfec053 100644 --- a/tests/ext/telemetry/telemetry_process_tags.phpt +++ b/tests/ext/telemetry/telemetry_process_tags.phpt @@ -28,7 +28,7 @@ dd_trace_serialize_closed_spans(); dd_trace_internal_fn("finalize_telemetry"); for ($i = 0; $i < 300; ++$i) { - usleep(100000); + ("us" . "leep")(100000); if (file_exists(__DIR__ . '/process-tags-telemetry.out')) { foreach (file(__DIR__ . '/process-tags-telemetry.out') as $l) { if ($l) { @@ -39,6 +39,9 @@ for ($i = 0; $i < 300; ++$i) { } } } +if ($i == 300) { + var_dump(file(__DIR__ . '/process-tags-telemetry.out')); +} ?> --EXPECTF-- diff --git a/tests/xdebug/2.7.2/self_disable_php_7.0.phpt b/tests/xdebug/2.7.2/self_disable_php_7.0.phpt index d8a32bbac18..85597c8483f 100644 --- a/tests/xdebug/2.7.2/self_disable_php_7.0.phpt +++ b/tests/xdebug/2.7.2/self_disable_php_7.0.phpt @@ -11,6 +11,6 @@ if (!extension_loaded('Xdebug')) die('skip: Xdebug required'); echo 'Done.' . PHP_EOL; ?> --EXPECTF-- -[ddtrace] [error] Found incompatible Xdebug version %s -[ddtrace] [error] Found incompatible extension(s); disabling conflicting functionality +[ddtrace] [error] [%d] Found incompatible Xdebug version %s +[ddtrace] [error] [%d] Found incompatible extension(s); disabling conflicting functionality Done. diff --git a/tests/xdebug/2.9.2/force_inject.phpt b/tests/xdebug/2.9.2/force_inject.phpt index b735f5fe22b..879a557ace6 100644 --- a/tests/xdebug/2.9.2/force_inject.phpt +++ b/tests/xdebug/2.9.2/force_inject.phpt @@ -13,6 +13,6 @@ if (!extension_loaded('Xdebug') || version_compare(phpversion('Xdebug'), '2.9.5' echo 'Done.' . PHP_EOL; ?> --EXPECTF-- -[ddtrace] [warning] Found incompatible Xdebug version %s; ddtrace requires Xdebug 2.9.5 or greater -[ddtrace] [warning] Found incompatible extension(s); ignoring since 'datadog.inject_force' is enabled +[ddtrace] [warning] [%d] Found incompatible Xdebug version %s; ddtrace requires Xdebug 2.9.5 or greater +[ddtrace] [warning] [%d] Found incompatible extension(s); ignoring since 'datadog.inject_force' is enabled Done. diff --git a/tests/xdebug/2.9.2/self_disable.phpt b/tests/xdebug/2.9.2/self_disable.phpt index a6fe0fae324..d080531f07a 100644 --- a/tests/xdebug/2.9.2/self_disable.phpt +++ b/tests/xdebug/2.9.2/self_disable.phpt @@ -11,6 +11,6 @@ if (!extension_loaded('Xdebug') || version_compare(phpversion('Xdebug'), '2.9.5' echo 'Done.' . PHP_EOL; ?> --EXPECTF-- -[ddtrace] [error] Found incompatible Xdebug version %s; ddtrace requires Xdebug 2.9.5 or greater -[ddtrace] [error] Found incompatible extension(s); disabling conflicting functionality +[ddtrace] [error] [%d] Found incompatible Xdebug version %s; ddtrace requires Xdebug 2.9.5 or greater +[ddtrace] [error] [%d] Found incompatible extension(s); disabling conflicting functionality Done.