From 096cc1e6cb38197c990cf29734c09f98aa451427 Mon Sep 17 00:00:00 2001 From: Ago Allikmaa Date: Tue, 12 Dec 2023 14:01:12 +0200 Subject: [PATCH] Add signalfx.tracing library/version tags, release 0.83.1-beta-sfx12 (#155) * Add signalfx.tracing library/version tags * Fix compilation for CI --- .circleci/config.yml | 15 ++- dockerfiles/ci/buster/build-extensions.sh | 4 +- dockerfiles/ci/xfail_tests/7.0.list | 8 +- dockerfiles/ci/xfail_tests/7.1.list | 8 +- dockerfiles/ci/xfail_tests/7.2.list | 6 +- dockerfiles/ci/xfail_tests/7.3.list | 5 +- dockerfiles/ci/xfail_tests/7.4.list | 5 +- dockerfiles/ci/xfail_tests/8.0.list | 5 +- dockerfiles/ci/xfail_tests/8.1.list | 24 +++- dockerfiles/ci/xfail_tests/8.2.list | 24 +++- ext/serializer.c | 4 + ext/version.h | 2 +- profiling/Cargo.lock | 112 ++++++++---------- profiling/Cargo.toml | 2 +- profiling/src/bindings/mod.rs | 4 +- profiling/src/lib.rs | 6 +- profiling/src/profiling.rs | 3 +- src/DDTrace/Tracer.php | 2 +- tests/Integrations/MongoDB/MongoDBTest.php | 26 ++-- .../signalfx_test_span_conversion.phpt | 6 +- 20 files changed, 152 insertions(+), 119 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 0bcb1c745..73b630e4e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1955,10 +1955,9 @@ workflows: - "datadog/dd-trace-ci:alpine" - "datadog/dd-trace-ci:buster" cmake_version: - - "3.19.8" - - "3.21.4" + - "3.24.4" catch2_version: - - "2.13.7" + - "2.13.10" zend_abstract_interface: jobs: @@ -1980,10 +1979,9 @@ workflows: - "8.1" - "8.2" cmake_version: - - "3.19.7" - - "3.20.1" + - "3.24.4" catch2_version: - - "2.13.5" + - "2.13.10" zend_abstract_interface_shared_exts: jobs: @@ -2735,7 +2733,8 @@ workflows: - alpine:3.12 - alpine:3.15 - alpine:3.16 - - alpine:latest + # SIGNALFX: latest breaks if dd install/verify is not kept up-to-date with upstream + #- alpine:latest - verify_alpine: requires: [ "package extension" ] matrix: @@ -3133,7 +3132,7 @@ workflows: requires: [ 'Prepare Code' ] name: "PHP 82 Xdebug tests" docker_image: "datadog/dd-trace-ci:php-8.2_buster" - xdebug_version_one: "3.2.0RC1" + xdebug_version_one: "3.2.2" - placeholder: requires: [ 'Prepare Code' ] name: Language tests diff --git a/dockerfiles/ci/buster/build-extensions.sh b/dockerfiles/ci/buster/build-extensions.sh index 1acb6c3ed..1bf00e29d 100755 --- a/dockerfiles/ci/buster/build-extensions.sh +++ b/dockerfiles/ci/buster/build-extensions.sh @@ -16,8 +16,10 @@ elif [[ $PHP_VERSION_ID -le 80 ]]; then XDEBUG_VERSIONS=(-3.0.0) elif [[ $PHP_VERSION_ID -le 81 ]]; then XDEBUG_VERSIONS=(-3.1.0) +elif [[ $PHP_VERSION_ID -le 82 ]]; then + XDEBUG_VERSIONS=(-3.2.2) else - XDEBUG_VERSIONS=(-3.2.0RC1) + XDEBUG_VERSIONS=(-3.3.0) fi MONGODB_VERSION= diff --git a/dockerfiles/ci/xfail_tests/7.0.list b/dockerfiles/ci/xfail_tests/7.0.list index a38a323e6..82bcf86cc 100644 --- a/dockerfiles/ci/xfail_tests/7.0.list +++ b/dockerfiles/ci/xfail_tests/7.0.list @@ -109,6 +109,7 @@ ext/date/tests/date_timestamp_set_nullparam2.phpt ext/date/tests/test-parse-from-format.phpt ext/fileinfo/tests/finfo_open_error.phpt ext/ftp/tests +ext/gd/tests/bug70976.phpt ext/json/tests/bug45791.phpt ext/json/tests/pass001.phpt ext/mbstring/tests/zend_multibyte-01.phpt @@ -146,14 +147,14 @@ ext/openssl/tests/streams_crypto_method.phpt ext/openssl/tests/tlsv1.0_wrapper.phpt ext/openssl/tests/tlsv1.1_wrapper.phpt ext/openssl/tests/tlsv1.2_wrapper.phpt +ext/pdo/tests/pdo_023.phpt +ext/pdo/tests/pdo_030.phpt ext/pdo_sqlite/tests/bug43831.phpt ext/pdo_sqlite/tests/bug44327_2.phpt ext/pdo_sqlite/tests/bug44327_3.phpt ext/pdo_sqlite/tests/bug48773.phpt ext/pdo_sqlite/tests/pdo_fetch_func_001.phpt ext/pdo_sqlite/tests/pdo_sqlite_lastinsertid.phpt -ext/pdo/tests/pdo_023.phpt -ext/pdo/tests/pdo_030.phpt ext/phar/tests/031.phpt ext/phar/tests/032.phpt ext/phar/tests/bug69720.phpt @@ -191,9 +192,11 @@ ext/simplexml/tests/bug69491.phpt ext/simplexml/tests/bug72971.phpt ext/simplexml/tests/bug72971_2.phpt ext/simplexml/tests/simplexml_load_file.phpt +ext/soap/tests/bugs/bug28751.phpt ext/sockets/tests/socket_connect_params.phpt ext/sockets/tests/socket_create_listen-nobind.phpt ext/sockets/tests/socket_create_pair.phpt +ext/sockets/tests/socket_shutdown.phpt ext/spl/tests/ArrayObject_clone_other_std_props.phpt ext/spl/tests/ArrayObject_dump_during_sort.phpt ext/spl/tests/ArrayObject_exchange_array_during_sorting.phpt @@ -325,6 +328,7 @@ ext/standard/tests/serialize/bug70219_1.phpt ext/standard/tests/serialize/serialization_objects_007.phpt ext/standard/tests/streams/proc_open_bug69900.phpt ext/standard/tests/strings/implode1.phpt +ext/xsl/tests/bug33853.phpt ext/zip/tests/bug38943.phpt ext/zip/tests/bug38943_2.phpt sapi/cli/tests/upload_2G.phpt diff --git a/dockerfiles/ci/xfail_tests/7.1.list b/dockerfiles/ci/xfail_tests/7.1.list index 412cb5215..f483e6af8 100644 --- a/dockerfiles/ci/xfail_tests/7.1.list +++ b/dockerfiles/ci/xfail_tests/7.1.list @@ -119,6 +119,7 @@ ext/date/tests/date_timestamp_set_nullparam2.phpt ext/date/tests/test-parse-from-format.phpt ext/fileinfo/tests/finfo_open_error.phpt ext/ftp/tests +ext/gd/tests/bug70976.phpt ext/json/tests/bug45791.phpt ext/json/tests/pass001.phpt ext/mbstring/tests/zend_multibyte-01.phpt @@ -158,14 +159,14 @@ ext/openssl/tests/streams_crypto_method.phpt ext/openssl/tests/tlsv1.0_wrapper.phpt ext/openssl/tests/tlsv1.1_wrapper.phpt ext/openssl/tests/tlsv1.2_wrapper.phpt +ext/pdo/tests/pdo_023.phpt +ext/pdo/tests/pdo_030.phpt ext/pdo_sqlite/tests/bug43831.phpt ext/pdo_sqlite/tests/bug44327_2.phpt ext/pdo_sqlite/tests/bug44327_3.phpt ext/pdo_sqlite/tests/bug48773.phpt ext/pdo_sqlite/tests/pdo_fetch_func_001.phpt ext/pdo_sqlite/tests/pdo_sqlite_lastinsertid.phpt -ext/pdo/tests/pdo_023.phpt -ext/pdo/tests/pdo_030.phpt ext/phar/tests/031.phpt ext/phar/tests/032.phpt ext/phar/tests/bug69720.phpt @@ -204,6 +205,8 @@ ext/simplexml/tests/bug69491.phpt ext/simplexml/tests/bug72971.phpt ext/simplexml/tests/bug72971_2.phpt ext/simplexml/tests/simplexml_load_file.phpt +ext/soap/tests/bugs/bug28751.phpt +ext/soap/tests/bugs/bug76348.phpt ext/sockets/tests/socket_connect_params.phpt ext/sockets/tests/socket_create_listen-nobind.phpt ext/sockets/tests/socket_create_pair.phpt @@ -340,6 +343,7 @@ ext/standard/tests/serialize/serialization_objects_007.phpt ext/standard/tests/streams/proc_open_bug69900.phpt ext/standard/tests/streams/stream_context_tcp_nodelay_fopen.phpt ext/standard/tests/strings/implode1.phpt +ext/xsl/tests/bug33853.phpt ext/zip/tests/bug38943.phpt ext/zip/tests/bug38943_2.phpt sapi/cli/tests/upload_2G.phpt diff --git a/dockerfiles/ci/xfail_tests/7.2.list b/dockerfiles/ci/xfail_tests/7.2.list index 577378a56..9de1231dd 100644 --- a/dockerfiles/ci/xfail_tests/7.2.list +++ b/dockerfiles/ci/xfail_tests/7.2.list @@ -103,6 +103,7 @@ ext/date/tests/date_timestamp_set_nullparam2.phpt ext/date/tests/test-parse-from-format.phpt ext/fileinfo/tests/finfo_open_error.phpt ext/ftp/tests +ext/gd/tests/bug70976.phpt ext/json/tests/bug45791.phpt ext/json/tests/bug77843.phpt ext/json/tests/pass001.phpt @@ -143,14 +144,14 @@ ext/openssl/tests/tls_wrapper.phpt ext/openssl/tests/tlsv1.0_wrapper.phpt ext/openssl/tests/tlsv1.1_wrapper.phpt ext/openssl/tests/tlsv1.2_wrapper.phpt +ext/pdo/tests/pdo_023.phpt +ext/pdo/tests/pdo_030.phpt ext/pdo_sqlite/tests/bug43831.phpt ext/pdo_sqlite/tests/bug44327_2.phpt ext/pdo_sqlite/tests/bug44327_3.phpt ext/pdo_sqlite/tests/bug48773.phpt ext/pdo_sqlite/tests/pdo_fetch_func_001.phpt ext/pdo_sqlite/tests/pdo_sqlite_lastinsertid.phpt -ext/pdo/tests/pdo_023.phpt -ext/pdo/tests/pdo_030.phpt ext/phar/tests/031.phpt ext/phar/tests/032.phpt ext/phar/tests/bug69720.phpt @@ -189,6 +190,7 @@ ext/simplexml/tests/bug69491.phpt ext/simplexml/tests/bug72971.phpt ext/simplexml/tests/bug72971_2.phpt ext/simplexml/tests/simplexml_load_file.phpt +ext/soap/tests/bugs/bug76348.phpt ext/sockets/tests/socket_connect_params.phpt ext/sockets/tests/socket_create_listen-nobind.phpt ext/sockets/tests/socket_create_pair.phpt diff --git a/dockerfiles/ci/xfail_tests/7.3.list b/dockerfiles/ci/xfail_tests/7.3.list index b339b834c..2bd57ab41 100644 --- a/dockerfiles/ci/xfail_tests/7.3.list +++ b/dockerfiles/ci/xfail_tests/7.3.list @@ -110,6 +110,7 @@ ext/date/tests/date_timestamp_set_nullparam2.phpt ext/date/tests/test-parse-from-format.phpt ext/fileinfo/tests/finfo_open_error.phpt ext/ftp/tests +ext/gd/tests/bug70976.phpt ext/json/tests/bug45791.phpt ext/json/tests/bug77843.phpt ext/json/tests/json_decode_exceptions.phpt @@ -154,14 +155,14 @@ ext/openssl/tests/tls_wrapper.phpt ext/openssl/tests/tlsv1.0_wrapper.phpt ext/openssl/tests/tlsv1.1_wrapper.phpt ext/openssl/tests/tlsv1.2_wrapper.phpt +ext/pdo/tests/pdo_023.phpt +ext/pdo/tests/pdo_030.phpt ext/pdo_sqlite/tests/bug43831.phpt ext/pdo_sqlite/tests/bug44327_2.phpt ext/pdo_sqlite/tests/bug44327_3.phpt ext/pdo_sqlite/tests/bug48773.phpt ext/pdo_sqlite/tests/pdo_fetch_func_001.phpt ext/pdo_sqlite/tests/pdo_sqlite_lastinsertid.phpt -ext/pdo/tests/pdo_023.phpt -ext/pdo/tests/pdo_030.phpt ext/phar/tests/031.phpt ext/phar/tests/032.phpt ext/phar/tests/bug69720.phpt diff --git a/dockerfiles/ci/xfail_tests/7.4.list b/dockerfiles/ci/xfail_tests/7.4.list index 2abc464c7..8a77be4de 100644 --- a/dockerfiles/ci/xfail_tests/7.4.list +++ b/dockerfiles/ci/xfail_tests/7.4.list @@ -162,6 +162,7 @@ ext/date/tests/date_timestamp_set_nullparam2.phpt ext/date/tests/test-parse-from-format.phpt ext/fileinfo/tests/finfo_open_error.phpt ext/ftp/tests +ext/gd/tests/bug70976.phpt ext/json/tests/bug45791.phpt ext/json/tests/bug77843.phpt ext/json/tests/json_decode_exceptions.phpt @@ -211,14 +212,14 @@ ext/openssl/tests/tlsv1.2_wrapper.phpt ext/openssl/tests/tlsv1.3_wrapper.phpt ext/pcntl/tests/pcntl_unshare_01.phpt ext/pcntl/tests/pcntl_unshare_03.phpt +ext/pdo/tests/pdo_023.phpt +ext/pdo/tests/pdo_030.phpt ext/pdo_sqlite/tests/bug43831.phpt ext/pdo_sqlite/tests/bug44327_2.phpt ext/pdo_sqlite/tests/bug44327_3.phpt ext/pdo_sqlite/tests/bug48773.phpt ext/pdo_sqlite/tests/pdo_fetch_func_001.phpt ext/pdo_sqlite/tests/pdo_sqlite_lastinsertid.phpt -ext/pdo/tests/pdo_023.phpt -ext/pdo/tests/pdo_030.phpt ext/phar/tests/031.phpt ext/phar/tests/032.phpt ext/phar/tests/bug69720.phpt diff --git a/dockerfiles/ci/xfail_tests/8.0.list b/dockerfiles/ci/xfail_tests/8.0.list index cd4841fa3..2b8f11168 100644 --- a/dockerfiles/ci/xfail_tests/8.0.list +++ b/dockerfiles/ci/xfail_tests/8.0.list @@ -170,7 +170,6 @@ Zend/tests/weakrefs/weakrefs_001.phpt ext/curl/tests/bug45161.phpt ext/curl/tests/bug48514.phpt ext/curl/tests/bug64267.phpt -ext/curl/tests/bug65458.phpt ext/curl/tests/bug72202.phpt ext/curl/tests/bug76675.phpt ext/curl/tests/bug77535.phpt @@ -256,14 +255,14 @@ ext/openssl/tests/tlsv1.3_wrapper.phpt ext/pcntl/tests/pcntl_unshare_01.phpt ext/pcntl/tests/pcntl_unshare_02.phpt ext/pcntl/tests/pcntl_unshare_03.phpt +ext/pdo/tests/pdo_023.phpt +ext/pdo/tests/pdo_030.phpt ext/pdo_sqlite/tests/bug43831.phpt ext/pdo_sqlite/tests/bug44327_2.phpt ext/pdo_sqlite/tests/bug44327_3.phpt ext/pdo_sqlite/tests/bug48773.phpt ext/pdo_sqlite/tests/pdo_fetch_func_001.phpt ext/pdo_sqlite/tests/pdo_sqlite_lastinsertid.phpt -ext/pdo/tests/pdo_023.phpt -ext/pdo/tests/pdo_030.phpt ext/phar/tests/031.phpt ext/phar/tests/032.phpt ext/phar/tests/bug69720.phpt diff --git a/dockerfiles/ci/xfail_tests/8.1.list b/dockerfiles/ci/xfail_tests/8.1.list index d82accb94..6ee1ddc59 100644 --- a/dockerfiles/ci/xfail_tests/8.1.list +++ b/dockerfiles/ci/xfail_tests/8.1.list @@ -1,6 +1,3 @@ -Zend/tests/fibers/out-of-memory-in-fiber.phpt -Zend/tests/fibers/out-of-memory-in-nested-fiber.phpt -Zend/tests/fibers/out-of-memory-in-recursive-fiber.phpt Zend/tests/014.phpt Zend/tests/arginfo_zpp_mismatch.phpt Zend/tests/arginfo_zpp_mismatch_strict.phpt @@ -16,20 +13,26 @@ Zend/tests/bug75921.phpt Zend/tests/bug78182.phpt Zend/tests/bug81104.phpt Zend/tests/each_002.phpt +Zend/tests/fibers/gh10496-001.phpt +Zend/tests/fibers/out-of-memory-in-fiber.phpt +Zend/tests/fibers/out-of-memory-in-nested-fiber.phpt +Zend/tests/fibers/out-of-memory-in-recursive-fiber.phpt Zend/tests/gc_031.phpt Zend/tests/gc_037.phpt Zend/tests/gc_045.phpt Zend/tests/get_defined_functions_basic.phpt Zend/tests/get_required_files.phpt Zend/tests/gh7958.phpt +Zend/tests/gh11189.phpt +Zend/tests/gh11189_1.phpt Zend/tests/list_keyed_conversions.phpt Zend/tests/multibyte/multibyte_encoding_004.phpt Zend/tests/object_gc_in_shutdown.phpt Zend/tests/offset_array.phpt Zend/tests/strict_001.phpt -Zend/tests/type_declarations/typed_properties_091.phpt Zend/tests/type_declarations/scalar_return_basic_64bit.phpt Zend/tests/type_declarations/scalar_strict_64bit.phpt +Zend/tests/type_declarations/typed_properties_091.phpt Zend/tests/weakrefs/weakmap_basic_map_behavior.phpt Zend/tests/weakrefs/weakmap_error_conditions.phpt ext/curl/tests/bug45161.phpt @@ -38,6 +41,7 @@ ext/curl/tests/bug76675.phpt ext/curl/tests/bug77535.phpt ext/curl/tests/bug79033.phpt ext/curl/tests/curl_int_cast.phpt +ext/curl/tests/curl_setopt_CURLOPT_ACCEPT_ENCODING.phpt ext/date/tests/bug52113.phpt ext/fileinfo/tests/finfo_open_error.phpt ext/mbstring/tests/zend_multibyte-01.phpt @@ -84,14 +88,14 @@ ext/openssl/tests/tlsv1.3_wrapper.phpt ext/pcntl/tests/pcntl_unshare_01.phpt ext/pcntl/tests/pcntl_unshare_02.phpt ext/pcntl/tests/pcntl_unshare_03.phpt +ext/pdo/tests/pdo_023.phpt +ext/pdo/tests/pdo_030.phpt ext/pdo_sqlite/tests/bug43831.phpt ext/pdo_sqlite/tests/bug44327_2.phpt ext/pdo_sqlite/tests/bug44327_3.phpt ext/pdo_sqlite/tests/bug48773.phpt ext/pdo_sqlite/tests/pdo_fetch_func_001.phpt ext/pdo_sqlite/tests/pdo_sqlite_lastinsertid.phpt -ext/pdo/tests/pdo_023.phpt -ext/pdo/tests/pdo_030.phpt ext/phar/tests/031.phpt ext/phar/tests/032.phpt ext/phar/tests/fatal_error_webphar.phpt @@ -124,8 +128,10 @@ ext/standard/tests/array/array_key_exists_object2.phpt ext/standard/tests/array/array_map_variation4.phpt ext/standard/tests/array/array_reverse_variation4.phpt ext/standard/tests/array/array_unique_variation3.phpt +ext/standard/tests/file/bug52820.phpt ext/standard/tests/file/disk_free_space_basic.phpt ext/standard/tests/file/lstat_stat_variation10.phpt +ext/standard/tests/file/lstat_stat_variation15.phpt ext/standard/tests/filters/bug54350.phpt ext/standard/tests/general_functions/bug73973.phpt ext/standard/tests/general_functions/floatval.phpt @@ -143,6 +149,9 @@ ext/standard/tests/math/base_convert_variation1.phpt ext/standard/tests/math/bindec_variation1_64bit.phpt ext/standard/tests/math/hexdec_variation1_64bit.phpt ext/standard/tests/math/octdec_variation1.phpt +ext/standard/tests/network/bug80067.phpt +ext/standard/tests/network/syslog_new_line.phpt +ext/standard/tests/network/syslog_null_byte.phpt ext/standard/tests/serialize/005.phpt ext/standard/tests/streams/bug78902.phpt ext/standard/tests/streams/proc_open_bug69900.phpt @@ -150,7 +159,9 @@ ext/standard/tests/streams/stream_context_tcp_nodelay_fopen.phpt ext/standard/tests/strings/implode1.phpt ext/standard/tests/strings/sprintf_variation54.phpt ext/tokenizer/tests/PhpToken_getAll.phpt +ext/zend_test/tests/ ext/zip/tests/bug38943.phpt +sapi/cli/tests/bug80092.phpt sapi/cli/tests/upload_2G.phpt sapi/fpm/tests/log-bm-in-shutdown-fn.phpt sapi/fpm/tests/log-bm-limit-1024-msg-80.phpt @@ -172,3 +183,4 @@ sapi/phpdbg/tests/stepping_001.phpt tests/classes/__call_007.phpt tests/lang/bug45392.phpt tests/output/ob_start_basic_002.phpt +Zend/tests/gh12073.phpt diff --git a/dockerfiles/ci/xfail_tests/8.2.list b/dockerfiles/ci/xfail_tests/8.2.list index ee3b5e53d..537d75ee2 100644 --- a/dockerfiles/ci/xfail_tests/8.2.list +++ b/dockerfiles/ci/xfail_tests/8.2.list @@ -1,6 +1,3 @@ -Zend/tests/fibers/out-of-memory-in-fiber.phpt -Zend/tests/fibers/out-of-memory-in-nested-fiber.phpt -Zend/tests/fibers/out-of-memory-in-recursive-fiber.phpt Zend/tests/014.phpt Zend/tests/arginfo_zpp_mismatch.phpt Zend/tests/arginfo_zpp_mismatch_strict.phpt @@ -15,12 +12,19 @@ Zend/tests/bug72038.phpt Zend/tests/bug75921.phpt Zend/tests/bug78182.phpt Zend/tests/bug81104.phpt +Zend/tests/fibers/gh10496-001.phpt +Zend/tests/fibers/out-of-memory-in-fiber.phpt +Zend/tests/fibers/out-of-memory-in-nested-fiber.phpt +Zend/tests/fibers/out-of-memory-in-recursive-fiber.phpt Zend/tests/gc_031.phpt Zend/tests/gc_037.phpt Zend/tests/gc_045.phpt Zend/tests/get_defined_functions_basic.phpt Zend/tests/get_required_files.phpt Zend/tests/gh7958.phpt +Zend/tests/gh10346.phpt +Zend/tests/gh11189.phpt +Zend/tests/gh11189_1.phpt Zend/tests/list_keyed_conversions.phpt Zend/tests/multibyte/multibyte_encoding_004.phpt Zend/tests/object_gc_in_shutdown.phpt @@ -36,8 +40,9 @@ ext/curl/tests/bug76675.phpt ext/curl/tests/bug77535.phpt ext/curl/tests/bug79033.phpt ext/curl/tests/curl_int_cast.phpt -ext/date/tests/bug52113.phpt ext/curl/tests/curl_postfields_array.phpt +ext/curl/tests/curl_setopt_CURLOPT_ACCEPT_ENCODING.phpt +ext/date/tests/bug52113.phpt ext/fileinfo/tests/finfo_open_error.phpt ext/mbstring/tests/zend_multibyte-01.phpt ext/mbstring/tests/zend_multibyte-02.phpt @@ -83,14 +88,14 @@ ext/openssl/tests/tlsv1.3_wrapper.phpt ext/pcntl/tests/pcntl_unshare_01.phpt ext/pcntl/tests/pcntl_unshare_02.phpt ext/pcntl/tests/pcntl_unshare_03.phpt +ext/pdo/tests/pdo_023.phpt +ext/pdo/tests/pdo_030.phpt ext/pdo_sqlite/tests/bug43831.phpt ext/pdo_sqlite/tests/bug44327_2.phpt ext/pdo_sqlite/tests/bug44327_3.phpt ext/pdo_sqlite/tests/bug48773.phpt ext/pdo_sqlite/tests/pdo_fetch_func_001.phpt ext/pdo_sqlite/tests/pdo_sqlite_lastinsertid.phpt -ext/pdo/tests/pdo_023.phpt -ext/pdo/tests/pdo_030.phpt ext/phar/tests/031.phpt ext/phar/tests/032.phpt ext/phar/tests/fatal_error_webphar.phpt @@ -120,6 +125,7 @@ ext/spl/tests/spl_autoload_013.phpt ext/standard/tests/array/array_map_variation4.phpt ext/standard/tests/array/array_reverse_variation4.phpt ext/standard/tests/array/array_unique_variation3.phpt +ext/standard/tests/file/bug52820.phpt ext/standard/tests/file/disk_free_space_basic.phpt ext/standard/tests/file/lstat_stat_variation10.phpt ext/standard/tests/filters/bug54350.phpt @@ -139,12 +145,17 @@ ext/standard/tests/math/base_convert_variation1.phpt ext/standard/tests/math/bindec_variation1_64bit.phpt ext/standard/tests/math/hexdec_variation1_64bit.phpt ext/standard/tests/math/octdec_variation1.phpt +ext/standard/tests/network/bug80067.phpt +ext/standard/tests/network/syslog_new_line.phpt +ext/standard/tests/network/syslog_null_byte.phpt ext/standard/tests/serialize/005.phpt ext/standard/tests/streams/bug78902.phpt ext/standard/tests/streams/proc_open_bug69900.phpt ext/standard/tests/streams/stream_context_tcp_nodelay_fopen.phpt ext/standard/tests/strings/implode1.phpt ext/standard/tests/strings/sprintf_variation54.phpt +ext/zend_test/tests/ +sapi/cli/tests/bug80092.phpt sapi/cli/tests/upload_2G.phpt sapi/fpm/tests/log-bm-in-shutdown-fn.phpt sapi/fpm/tests/log-bm-limit-1024-msg-80.phpt @@ -165,3 +176,4 @@ sapi/phpdbg/tests/exceptions_003.phpt sapi/phpdbg/tests/stepping_001.phpt tests/lang/bug45392.phpt tests/output/ob_start_basic_002.phpt +Zend/tests/gh12073.phpt diff --git a/ext/serializer.c b/ext/serializer.c index 5fcfc4755..9267eefa2 100644 --- a/ext/serializer.c +++ b/ext/serializer.c @@ -29,6 +29,7 @@ #include "signalfx/json_writer.h" #include "span.h" #include "uri_normalization.h" +#include "version.h" ZEND_EXTERN_MODULE_GLOBALS(ddtrace); @@ -1082,6 +1083,9 @@ void signalfx_serialize_sfx_span_to_array(zval* spans_array, ddtrace_span_data * zval *tags = &tags_zv; array_init(tags); + add_assoc_string(tags, "signalfx.tracing.library", "php-tracing"); + add_assoc_string(tags, "signalfx.tracing.version", PHP_DDTRACE_VERSION); + bool error_kind_present = false; zval *dd_tags = zend_hash_str_find(Z_ARR_P(dd_span), ZEND_STRL("meta")); diff --git a/ext/version.h b/ext/version.h index 772502121..ec5639238 100644 --- a/ext/version.h +++ b/ext/version.h @@ -1,4 +1,4 @@ #ifndef PHP_DDTRACE_VERSION // Must begin with a number for Debian packaging requirements -#define PHP_DDTRACE_VERSION "0.83.1-beta-sfx11" +#define PHP_DDTRACE_VERSION "0.83.1-beta-sfx12" #endif diff --git a/profiling/Cargo.lock b/profiling/Cargo.lock index fb7dbd125..ab2866a4d 100644 --- a/profiling/Cargo.lock +++ b/profiling/Cargo.lock @@ -20,15 +20,6 @@ dependencies = [ "libc", ] -[[package]] -name = "ansi_term" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" -dependencies = [ - "winapi", -] - [[package]] name = "anyhow" version = "1.0.68" @@ -60,24 +51,24 @@ checksum = "a4a4ddaa51a5bc52a6948f74c06d20aaaddb71924eab79b8c97a8c556e942d6a" [[package]] name = "bindgen" -version = "0.59.2" +version = "0.66.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bd2a9a458e8f4304c52c43ebb0cfbd520289f8379a52e329a38afda99bf8eb8" +checksum = "f2b84e06fc203107bfbad243f4aba2af864eb7db3b1cf46ea0a023b0b433d2a7" dependencies = [ - "bitflags", + "bitflags 2.4.1", "cexpr", "clang-sys", - "clap", - "env_logger", "lazy_static", "lazycell", "log", "peeking_take_while", + "prettyplease", "proc-macro2", "quote", "regex", "rustc-hash", "shlex", + "syn 2.0.39", "which", ] @@ -87,6 +78,12 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +[[package]] +name = "bitflags" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" + [[package]] name = "bumpalo" version = "3.11.1" @@ -146,21 +143,6 @@ dependencies = [ "libloading", ] -[[package]] -name = "clap" -version = "2.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" -dependencies = [ - "ansi_term", - "atty", - "bitflags", - "strsim", - "textwrap", - "unicode-width", - "vec_map", -] - [[package]] name = "cmake" version = "0.1.49" @@ -265,7 +247,7 @@ dependencies = [ "proc-macro2", "quote", "scratch", - "syn", + "syn 1.0.107", ] [[package]] @@ -282,7 +264,7 @@ checksum = "39e61fda7e62115119469c7b3591fd913ecca96fb766cfd3f2e2502ab7bc87a5" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.107", ] [[package]] @@ -453,7 +435,7 @@ checksum = "bdfb8ce053d86b91919aad980c220b1fb8401a9394410e1c289ed7e66b61835d" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.107", ] [[package]] @@ -868,7 +850,7 @@ checksum = "069bdb1e05adc7a8990dce9cc75370895fbe4e3d58b9b73bf1aee56359344a55" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.107", ] [[package]] @@ -889,11 +871,21 @@ version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +[[package]] +name = "prettyplease" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae005bd773ab59b4725093fd7df83fd7892f7d8eafb48dbd7de6e024e4215f9d" +dependencies = [ + "proc-macro2", + "syn 2.0.39", +] + [[package]] name = "proc-macro2" -version = "1.0.49" +version = "1.0.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57a8eca9f9c4ffde41714334dee777596264c7825420f521abc92b5b5deb63a5" +checksum = "39278fbbf5fb4f646ce651690877f89d1c5811a3d4acb27700c1cb3cdb78fd3b" dependencies = [ "unicode-ident", ] @@ -940,7 +932,7 @@ dependencies = [ "itertools", "proc-macro2", "quote", - "syn", + "syn 1.0.107", ] [[package]] @@ -955,9 +947,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.23" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8856d8364d252a14d474036ea1358d63c9e6965c8e5c1885c18f73d70bff9c7b" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ "proc-macro2", ] @@ -998,7 +990,7 @@ version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" dependencies = [ - "bitflags", + "bitflags 1.3.2", ] [[package]] @@ -1118,7 +1110,7 @@ version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2bc1bb97804af6631813c55739f771071e0f2ed33ee20b68c86ec505d906356c" dependencies = [ - "bitflags", + "bitflags 1.3.2", "core-foundation", "core-foundation-sys", "libc", @@ -1152,7 +1144,7 @@ checksum = "af487d118eecd09402d70a5d72551860e788df87b464af30e5ea6a38c75c541e" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.107", ] [[package]] @@ -1204,16 +1196,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] -name = "strsim" -version = "0.8.0" +name = "syn" +version = "1.0.107" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" +checksum = "1f4064b5b16e03ae50984a5a8ed5d4f8803e6bc1fd170a3cda91a1be4b18e3f5" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] [[package]] name = "syn" -version = "1.0.107" +version = "2.0.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f4064b5b16e03ae50984a5a8ed5d4f8803e6bc1fd170a3cda91a1be4b18e3f5" +checksum = "23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a" dependencies = [ "proc-macro2", "quote", @@ -1243,15 +1240,6 @@ dependencies = [ "winapi-util", ] -[[package]] -name = "textwrap" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" -dependencies = [ - "unicode-width", -] - [[package]] name = "thiserror" version = "1.0.38" @@ -1269,7 +1257,7 @@ checksum = "1fb327af4685e4d03fa8cbcf1716380da910eeb2bb8be417e7f9fd3fb164f36f" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.107", ] [[package]] @@ -1306,7 +1294,7 @@ checksum = "d266c00fde287f55d3f1c3e96c500c362a2b8c695076ec180f27918820bc6df8" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.107", ] [[package]] @@ -1411,12 +1399,6 @@ dependencies = [ "getrandom", ] -[[package]] -name = "vec_map" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" - [[package]] name = "version_check" version = "0.9.4" @@ -1466,7 +1448,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn", + "syn 1.0.107", "wasm-bindgen-shared", ] @@ -1488,7 +1470,7 @@ checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.107", "wasm-bindgen-backend", "wasm-bindgen-shared", ] diff --git a/profiling/Cargo.toml b/profiling/Cargo.toml index 954a9a603..021adb385 100644 --- a/profiling/Cargo.toml +++ b/profiling/Cargo.toml @@ -29,7 +29,7 @@ uuid = { version = "1.0", features = ["v4"] } allocation_profiling = [] [build-dependencies] -bindgen = { version = "0.59" } +bindgen = { version = "0.66.1" } cc = { version = "1.0" } [profile.release] diff --git a/profiling/src/bindings/mod.rs b/profiling/src/bindings/mod.rs index 61fe5c866..6f35d76a9 100644 --- a/profiling/src/bindings/mod.rs +++ b/profiling/src/bindings/mod.rs @@ -10,8 +10,8 @@ use std::sync::atomic::AtomicBool; pub type VmInterruptFn = unsafe extern "C" fn(execute_data: *mut zend_execute_data); -pub type VmMmCustomAllocFn = unsafe extern "C" fn(u64) -> *mut libc::c_void; -pub type VmMmCustomReallocFn = unsafe extern "C" fn(*mut libc::c_void, u64) -> *mut libc::c_void; +pub type VmMmCustomAllocFn = unsafe extern "C" fn(size_t) -> *mut libc::c_void; +pub type VmMmCustomReallocFn = unsafe extern "C" fn(*mut libc::c_void, size_t) -> *mut libc::c_void; pub type VmMmCustomFreeFn = unsafe extern "C" fn(*mut libc::c_void); // todo: this a lie on some PHP versions; is it a problem even though zend_bool diff --git a/profiling/src/lib.rs b/profiling/src/lib.rs index 950e6cfbf..f96febf87 100644 --- a/profiling/src/lib.rs +++ b/profiling/src/lib.rs @@ -13,7 +13,7 @@ use bindings::{ZendExtension, ZendResult}; use config::AgentEndpoint; use datadog_profiling::exporter::{Tag, Uri}; use lazy_static::lazy_static; -use libc::{c_char, c_int}; +use libc::{c_char, c_int, size_t}; use log::{debug, error, info, trace, warn, LevelFilter}; use once_cell::sync::OnceCell; use sapi::Sapi; @@ -934,7 +934,7 @@ extern "C" fn execute_internal( interrupt_function(execute_data); } -unsafe extern "C" fn alloc_profiling_malloc(len: u64) -> *mut ::libc::c_void { +unsafe extern "C" fn alloc_profiling_malloc(len: size_t) -> *mut ::libc::c_void { let ptr: *mut libc::c_void; // TODO: prepare a function pointer to use so we don't need a runtime check @@ -988,7 +988,7 @@ unsafe extern "C" fn alloc_profiling_free(ptr: *mut ::libc::c_void) { unsafe extern "C" fn alloc_profiling_realloc( ptr: *mut ::libc::c_void, - len: u64, + len: size_t, ) -> *mut ::libc::c_void { if PREV_CUSTOM_MM_REALLOC.is_none() { zend::_zend_mm_realloc(zend::zend_mm_get_heap(), ptr, len) diff --git a/profiling/src/profiling.rs b/profiling/src/profiling.rs index cd02216e3..dc519cb76 100644 --- a/profiling/src/profiling.rs +++ b/profiling/src/profiling.rs @@ -9,6 +9,7 @@ use crossbeam_channel::{select, Receiver, Sender, TrySendError}; use datadog_profiling::exporter::{Endpoint, File, Tag}; use datadog_profiling::profile; use datadog_profiling::profile::api::{Function, Line, Location, Period, Sample}; +use libc::size_t; use log::{debug, info, trace, warn}; use std::borrow::{Borrow, Cow}; use std::collections::HashMap; @@ -848,7 +849,7 @@ impl Profiler { pub unsafe fn collect_allocations( &self, execute_data: *mut zend_execute_data, - allocation_size: u64, + allocation_size: size_t, locals: &RequestLocals, ) { let result = collect_stack_sample(execute_data); diff --git a/src/DDTrace/Tracer.php b/src/DDTrace/Tracer.php index 1f45051e7..853d68fae 100644 --- a/src/DDTrace/Tracer.php +++ b/src/DDTrace/Tracer.php @@ -24,7 +24,7 @@ final class Tracer implements TracerInterface * Must begin with a number for Debian packaging requirements * Must use single-quotes for packaging script to work */ - const VERSION = '0.83.1-beta-sfx11'; + const VERSION = '0.83.1-beta-sfx12'; /** * @var Span[][] diff --git a/tests/Integrations/MongoDB/MongoDBTest.php b/tests/Integrations/MongoDB/MongoDBTest.php index 8c440aa99..ac2a745c9 100644 --- a/tests/Integrations/MongoDB/MongoDBTest.php +++ b/tests/Integrations/MongoDB/MongoDBTest.php @@ -180,18 +180,24 @@ public function testException() } catch (Exception $e) { } }); - + $tags = [ + 'mongodb.db' => self::DATABASE, + 'mongodb.collection' => 'cars', + 'mongodb.query' => '"?"', + 'span.kind' => 'client', + 'component' => 'mongodb', + ]; + // On newer versions of the mongodb library, the datadog subscriber is only called after the arguments check + if (PHP_VERSION_ID < 70400 || (PHP_VERSION_ID >= 80000 && PHP_VERSION_ID < 80200)) { + $tags += [ + 'out.host' => self::HOST, + 'out.port' => self::PORT, + ]; + } $this->assertFlameGraph($traces, [ SpanAssertion::build('mongodb.cmd', 'mongodb', 'mongodb', 'find test_db cars "?"') - ->withExactTags([ - 'mongodb.db' => self::DATABASE, - 'mongodb.collection' => 'cars', - 'mongodb.query' => '"?"', - 'span.kind' => 'client', - 'out.host' => self::HOST, - 'out.port' => self::PORT, - 'component' => 'mongodb', - ])->setError('MongoDB\Exception\InvalidArgumentException') + ->withExactTags($tags) + ->setError('MongoDB\Exception\InvalidArgumentException') ->withExistingTagsNames([Tag::ERROR_MSG, 'error.stack']), ]); } diff --git a/tests/ext/signalfx/signalfx_test_span_conversion.phpt b/tests/ext/signalfx/signalfx_test_span_conversion.phpt index 957700f5d..512322fa9 100644 --- a/tests/ext/signalfx/signalfx_test_span_conversion.phpt +++ b/tests/ext/signalfx/signalfx_test_span_conversion.phpt @@ -50,7 +50,11 @@ array(1) { ["name"]=> string(7) "dd_name" ["tags"]=> - array(7) { + array(9) { + ["signalfx.tracing.library"]=> + string(11) "php-tracing" + ["signalfx.tracing.version"]=> + string(%d) "%s" ["sfx.error.kind"]=> string(13) "dd_error_type" ["sfx.error.message"]=>