diff --git a/.github/workflows/bug-report-response.yml b/.github/workflows/bug-report-response.yml new file mode 100644 index 000000000..e7cb9aeef --- /dev/null +++ b/.github/workflows/bug-report-response.yml @@ -0,0 +1,36 @@ +# Copyright 2020 New Relic Corporation. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 +# + +name: bug-report-response + +on: + issues: + types: + - labeled + +jobs: + bug-report-response: + if: github.event.label.name == 'bug' && github.event.issue.state == 'open' + uses: ./.github/workflows/issue-comment.yml + with: + issue-number: ${{ github.event.issue.number }} + message: > + Thank you for your issue report. A member of the New Relic PHP Agent Team + will review your report and endeavor to respond in a timely manner. + + Need troubleshooting help? Please review some of our common troubleshooting documentation, starting with [generating debug logs](https://docs.newrelic.com/docs/apm/agents/php-agent/troubleshooting/generating-logs-troubleshooting-php/). + From there, additional resources and tips are available in our troubleshooting section, accessible from the left-hand panel of our documentation site. Additionally, please be sure to visit + our [Explorer's Hub](https://forum.newrelic.com/s/), where other members of the community may have solved an issue similar to yours with the help of our Support team members. + + Have a question regarding support for an Operating System, PHP Version, Framework, or Library? + Please take a look at our [Compatibility Docs](https://docs.newrelic.com/docs/apm/agents/php-agent/getting-started/php-agent-compatibility-requirements/). + + Binary support for ARM-based CPU architecture is now available via the [tarball installation](https://docs.newrelic.com/docs/apm/agents/php-agent/installation/php-agent-installation-arm64/#tarball-installation) method for PHP Versions 8.0+! + + General installation instructions can be found on our [Installation Overview](https://docs.newrelic.com/docs/apm/agents/php-agent/installation/php-agent-installation-overview/) page. + + Need more information about an Agent INI setting? Our [Configuration](https://docs.newrelic.com/docs/apm/agents/php-agent/configuration/php-agent-configuration/) + page contains an explanation for each INI setting and how to modify the defaults. + + Looking for something else? All New Relic PHP Agent Documentation can be found under our [Introduction](https://docs.newrelic.com/docs/apm/agents/php-agent/getting-started/introduction-new-relic-php/) page. diff --git a/.github/workflows/issue-comment.yml b/.github/workflows/issue-comment.yml new file mode 100644 index 000000000..377d711e3 --- /dev/null +++ b/.github/workflows/issue-comment.yml @@ -0,0 +1,25 @@ +# Copyright 2020 New Relic Corporation. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 +# + +name: issue-comment + +on: + workflow_call: + inputs: + issue-number: + type: number + required: true + message: + type: string + required: true + +jobs: + post-comment: + runs-on: ubuntu-latest + env: + GH_TOKEN: ${{ secrets.ISSUE_BOT_TOKEN }} + steps: + - name: respond to issue + run: | + gh issue comment ${{ inputs.issue-number }} --body ${{ inputs.message }} diff --git a/.github/workflows/issue-support-label.yml b/.github/workflows/issue-support-label.yml new file mode 100644 index 000000000..a738068c6 --- /dev/null +++ b/.github/workflows/issue-support-label.yml @@ -0,0 +1,28 @@ +# Copyright 2020 New Relic Corporation. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 +# + +name: issue-support-label + +on: + issues: + types: + - labeled + +jobs: + support-response: + if: github.event.label.name == 'support' && github.event.issue.state == 'open' + uses: ./.github/workflows/issue-comment.yml + with: + issue-number: ${{ github.event.issue.number }} + message: > + This issue has been identified as requiring additional information to debug. + Due to the potentially sensitive nature of the information we may have to collect, + such as PHPInfo and Debug Logs, please follow [these steps](https://docs.newrelic.com/docs/new-relic-solutions/solve-common-issues/find-help-use-support-portal/#file-ticket) + to create a support case, where a member of our New Relic Support Team will work + with you to gather the necessary information securely and help debug your issue. + + If your subscription level does not include technical support, the + other option available to customers is to use New Relic’s community support channel: [Explorers Hub](https://forum.newrelic.com/s/). From there, a member of our New Relic Support Team will work + with you to gather the necessary information securely and help debug your issue. + For all available options on how to get support, please see [these resources](https://docs.newrelic.com/docs/new-relic-solutions/solve-common-issues/find-help-use-support-portal/). diff --git a/VERSION b/VERSION index 5b7269c0a..ea4ccb283 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -10.19.0 +10.20.0 diff --git a/agent/fw_drupal8.c b/agent/fw_drupal8.c index fbd04f315..6593e17a8 100644 --- a/agent/fw_drupal8.c +++ b/agent/fw_drupal8.c @@ -18,6 +18,8 @@ #include "util_memory.h" #include "util_strings.h" +#define PHP_PACKAGE_NAME "drupal/core" + /* * Purpose : Convenience function to handle adding a callback to a method, * given a class entry and a method name. This will check the @@ -684,7 +686,11 @@ void nr_drupal_version() { // Add php package to transaction if (nr_php_is_zval_valid_string(zval_version)) { char* version = Z_STRVAL_P(zval_version); - nr_txn_add_php_package(NRPRG(txn), "drupal/core", version); + if (NRINI(vulnerability_management_package_detection_enabled)) { + nr_txn_add_php_package(NRPRG(txn), PHP_PACKAGE_NAME, version); + } + nr_fw_support_add_package_supportability_metric(NRPRG(txn), PHP_PACKAGE_NAME, + version); } nr_php_zval_free(&zval_version); @@ -753,7 +759,7 @@ void nr_drupal8_enable(TSRMLS_D) { } if (NRINI(vulnerability_management_package_detection_enabled)) { - nr_txn_add_php_package(NRPRG(txn), "drupal/core", + nr_txn_add_php_package(NRPRG(txn), PHP_PACKAGE_NAME, PHP_PACKAGE_VERSION_UNKNOWN); } } diff --git a/agent/fw_hooks.h b/agent/fw_hooks.h index f49bc591b..baaf400c7 100644 --- a/agent/fw_hooks.h +++ b/agent/fw_hooks.h @@ -39,7 +39,8 @@ extern void nr_symfony4_enable(TSRMLS_D); extern void nr_silex_enable(TSRMLS_D); extern void nr_slim_enable(TSRMLS_D); extern void nr_wordpress_enable(TSRMLS_D); -extern void nr_yii_enable(TSRMLS_D); +extern void nr_yii1_enable(TSRMLS_D); +extern void nr_yii2_enable(TSRMLS_D); extern void nr_zend_enable(TSRMLS_D); extern void nr_fw_zend2_enable(TSRMLS_D); diff --git a/agent/fw_laravel.c b/agent/fw_laravel.c index 8d35715d2..11718a7e6 100644 --- a/agent/fw_laravel.c +++ b/agent/fw_laravel.c @@ -24,6 +24,8 @@ #include "ext/standard/php_versioning.h" #include "Zend/zend_exceptions.h" +#define PHP_PACKAGE_NAME "laravel/framework" + /* * This instruments Laravel 4.0-5.0, inclusive. * There is no support for Laravel 3.X or earlier. @@ -959,8 +961,10 @@ NR_PHP_WRAPPER(nr_laravel_application_construct) { if (NRINI(vulnerability_management_package_detection_enabled)) { // Add php package to transaction - nr_txn_add_php_package(NRPRG(txn), "laravel/framework", version); + nr_txn_add_php_package(NRPRG(txn), PHP_PACKAGE_NAME, version); } + nr_fw_support_add_package_supportability_metric(NRPRG(txn), PHP_PACKAGE_NAME, + version); if (version) { nrl_debug(NRL_FRAMEWORK, "Laravel version is " NRP_FMT, NRP_PHP(version)); diff --git a/agent/fw_slim.c b/agent/fw_slim.c index e810dd7f4..493e325a8 100644 --- a/agent/fw_slim.c +++ b/agent/fw_slim.c @@ -12,6 +12,8 @@ #include "fw_support.h" #include "util_logging.h" +#define PHP_PACKAGE_NAME "slim/slim" + static char* nr_slim_path_from_route(zval* route TSRMLS_DC) { zval* name = NULL; zval* pattern = NULL; @@ -119,8 +121,13 @@ NR_PHP_WRAPPER(nr_slim_application_construct) { version = nr_php_get_object_constant(this_var, "VERSION"); - // Add php package to transaction - nr_txn_add_php_package(NRPRG(txn), "slim/slim", version); + if (NRINI(vulnerability_management_package_detection_enabled)) { + // Add php package to transaction + nr_txn_add_php_package(NRPRG(txn), PHP_PACKAGE_NAME, version); + } + + nr_fw_support_add_package_supportability_metric(NRPRG(txn), PHP_PACKAGE_NAME, + version); nr_free(version); nr_php_scope_release(&this_var); @@ -139,13 +146,11 @@ void nr_slim_enable(TSRMLS_D) { nr_php_wrap_user_function(NR_PSTR("Slim\\Routing\\Route::run"), nr_slim3_4_route_run TSRMLS_CC); - if (NRINI(vulnerability_management_package_detection_enabled)) { - /* Slim 2 does not have the same path as Slim 3/4 which is why - we need to separate these*/ - nr_php_wrap_user_function(NR_PSTR("Slim\\Slim::__construct"), - nr_slim_application_construct); + /* Slim 2 does not have the same path as Slim 3/4 which is why + we need to separate these*/ + nr_php_wrap_user_function(NR_PSTR("Slim\\Slim::__construct"), + nr_slim_application_construct); - nr_php_wrap_user_function(NR_PSTR("Slim\\App::__construct"), - nr_slim_application_construct); - } + nr_php_wrap_user_function(NR_PSTR("Slim\\App::__construct"), + nr_slim_application_construct); } diff --git a/agent/fw_support.c b/agent/fw_support.c index f615aef10..daff2692c 100644 --- a/agent/fw_support.c +++ b/agent/fw_support.c @@ -11,6 +11,8 @@ #include "util_memory.h" #include "util_strings.h" +#define MAJOR_VERSION_LENGTH 8 + void nr_php_framework_add_supportability_metric(const char* framework_name, const char* name TSRMLS_DC) { char buf[512]; @@ -52,3 +54,36 @@ void nr_fw_support_add_logging_supportability_metric(nrtxn_t* txn, nrm_force_add(txn->unscoped_metrics, metname, 0); nr_free(metname); } + +void nr_fw_support_add_package_supportability_metric( + nrtxn_t* txn, + const char* package_name, + const char* package_version) { + if (NULL == txn || NULL == package_name || NULL == package_version) { + return; + } + + char* metname = NULL; + char major_version[MAJOR_VERSION_LENGTH] = {0}; + + /* The below for loop checks if the major version of the package is more than + * one digit and keeps looping until a '.' is encountered or one of the + * conditions is met. + */ + for (int i = 0; package_version[i] && i < MAJOR_VERSION_LENGTH - 1; i++) { + if ('.' == package_version[i]) { + break; + } + major_version[i] = package_version[i]; + } + + if (NR_FW_UNSET == NRINI(force_framework)) { + metname = nr_formatf("Supportability/PHP/package/%s/%s/detected", + package_name, major_version); + } else { + metname = nr_formatf("Supportability/PHP/package/%s/%s/forced", + package_name, major_version); + } + nrm_force_add(txn->unscoped_metrics, metname, 0); + nr_free(metname); +} diff --git a/agent/fw_support.h b/agent/fw_support.h index 45c5f8269..5099a7d35 100644 --- a/agent/fw_support.h +++ b/agent/fw_support.h @@ -38,4 +38,17 @@ extern void nr_fw_support_add_logging_supportability_metric( const char* library_name, const bool is_enabled); +/* + * Purpose: Add 'Supportability/PHP/package/{package}/{version}/detected' metric + * + * Params : 1. Transaction object + * 2. Package name + * 3. Package version + * + */ +extern void nr_fw_support_add_package_supportability_metric( + nrtxn_t* txn, + const char* package_name, + const char* package_version); + #endif /* FW_SUPPORT_HDR */ diff --git a/agent/fw_wordpress.c b/agent/fw_wordpress.c index 874ab6cc8..55a0be5f0 100644 --- a/agent/fw_wordpress.c +++ b/agent/fw_wordpress.c @@ -21,6 +21,7 @@ #define NR_WORDPRESS_HOOK_PREFIX "Framework/WordPress/Hook/" #define NR_WORDPRESS_PLUGIN_PREFIX "Framework/WordPress/Plugin/" +#define PHP_PACKAGE_NAME "wordpress" static nr_regex_t* wordpress_hook_regex; @@ -809,7 +810,11 @@ void nr_wordpress_version() { if (SUCCESS == result) { if (nr_php_is_zval_valid_string(&retval)) { char* version = Z_STRVAL(retval); - nr_txn_add_php_package(NRPRG(txn), "wordpress", version); + if (NRINI(vulnerability_management_package_detection_enabled)) { + nr_txn_add_php_package(NRPRG(txn), PHP_PACKAGE_NAME, version); + } + nr_fw_support_add_package_supportability_metric(NRPRG(txn), PHP_PACKAGE_NAME, + version); } zval_dtor(&retval); } @@ -865,7 +870,7 @@ void nr_wordpress_enable(TSRMLS_D) { #endif /* OAPI */ if (NRINI(vulnerability_management_package_detection_enabled)) { - nr_txn_add_php_package(NRPRG(txn), "wordpress", + nr_txn_add_php_package(NRPRG(txn), PHP_PACKAGE_NAME, PHP_PACKAGE_VERSION_UNKNOWN); } } diff --git a/agent/fw_yii.c b/agent/fw_yii.c index c6ff7cef8..74aa19335 100644 --- a/agent/fw_yii.c +++ b/agent/fw_yii.c @@ -5,6 +5,7 @@ #include "php_agent.h" #include "php_call.h" #include "php_user_instrument.h" +#include "php_error.h" #include "php_execute.h" #include "php_wrapper.h" #include "fw_hooks.h" @@ -14,7 +15,7 @@ #include "util_strings.h" /* - * Set the web transaction name from the action. + * Yii1: Set the web transaction name from the controllerId + actionId combo. * * * txn naming scheme: * In this case, `nr_txn_set_path` is called before `NR_PHP_WRAPPER_CALL` with @@ -23,8 +24,7 @@ * ensure OAPI compatibility. This entails that the first wrapped call gets to * name the txn. */ - -NR_PHP_WRAPPER(nr_yii_runWithParams_wrapper) { +NR_PHP_WRAPPER(nr_yii1_runWithParams_wrapper) { zval* classz = NULL; zval* idz = NULL; zval* this_var = NULL; @@ -37,7 +37,7 @@ NR_PHP_WRAPPER(nr_yii_runWithParams_wrapper) { (void)wraprec; NR_UNUSED_SPECIALFN; - NR_PHP_WRAPPER_REQUIRE_FRAMEWORK(NR_FW_YII); + NR_PHP_WRAPPER_REQUIRE_FRAMEWORK(NR_FW_YII1); this_var = nr_php_scope_get(NR_EXECUTE_ORIG_ARGS TSRMLS_CC); if (NULL == this_var) { @@ -76,8 +76,9 @@ NR_PHP_WRAPPER(nr_yii_runWithParams_wrapper) { NR_NOT_OK_TO_OVERWRITE); } } + nr_php_zval_free(&idz); } - + nr_php_zval_free(&classz); end: NR_PHP_WRAPPER_CALL; @@ -86,21 +87,138 @@ NR_PHP_WRAPPER(nr_yii_runWithParams_wrapper) { NR_PHP_WRAPPER_END /* - * Enable Yii instrumentation. + * Enable Yii1 instrumentation. */ -void nr_yii_enable(TSRMLS_D) { +void nr_yii1_enable(TSRMLS_D) { #if ZEND_MODULE_API_NO >= ZEND_8_0_X_API_NO \ && !defined OVERWRITE_ZEND_EXECUTE_DATA nr_php_wrap_user_function_before_after_clean( - NR_PSTR("CAction::runWithParams"), nr_yii_runWithParams_wrapper, NULL, + NR_PSTR("CAction::runWithParams"), nr_yii1_runWithParams_wrapper, NULL, NULL); nr_php_wrap_user_function_before_after_clean( - NR_PSTR("CInlineAction::runWithParams"), nr_yii_runWithParams_wrapper, + NR_PSTR("CInlineAction::runWithParams"), nr_yii1_runWithParams_wrapper, NULL, NULL); #else nr_php_wrap_user_function(NR_PSTR("CAction::runWithParams"), - nr_yii_runWithParams_wrapper TSRMLS_CC); + nr_yii1_runWithParams_wrapper TSRMLS_CC); nr_php_wrap_user_function(NR_PSTR("CInlineAction::runWithParams"), - nr_yii_runWithParams_wrapper TSRMLS_CC); + nr_yii1_runWithParams_wrapper TSRMLS_CC); +#endif +} + +/* + * Yii2: Set the web transaction name from the unique action ID. + */ +NR_PHP_WRAPPER(nr_yii2_runWithParams_wrapper) { + zval* this_var = NULL; + zval* unique_idz = NULL; + const char* unique_id = NULL; + nr_string_len_t unique_id_length; + char* transaction_name = NULL; + + (void)wraprec; + NR_UNUSED_SPECIALFN; + + NR_PHP_WRAPPER_REQUIRE_FRAMEWORK(NR_FW_YII2); + + this_var = nr_php_scope_get(NR_EXECUTE_ORIG_ARGS TSRMLS_CC); + if (NULL == this_var) { + nrl_verbosedebug(NRL_FRAMEWORK, "Yii2: improper this"); + goto end; + } + + unique_idz = nr_php_call(this_var, "getUniqueId"); + if (nr_php_is_zval_non_empty_string(unique_idz)) { + unique_id = Z_STRVAL_P(unique_idz); + unique_id_length = Z_STRLEN_P(unique_idz); + + if (unique_id_length > 256) { + nrl_warning(NRL_FRAMEWORK, + "Yii2 unique ID is too long (> %d); Yii2 naming not used", + 256); + } else { + transaction_name = (char*)nr_alloca(unique_id_length + 1); + nr_strxcpy(transaction_name, unique_id, unique_id_length); + + nr_txn_set_path("Yii2", NRPRG(txn), transaction_name, NR_PATH_TYPE_ACTION, + NR_NOT_OK_TO_OVERWRITE); + } + } else { + nrl_verbosedebug(NRL_FRAMEWORK, + "getUniqueId does not return a non empty string (%d)", + Z_TYPE_P(unique_idz)); + } + nr_php_zval_free(&unique_idz); +end: + NR_PHP_WRAPPER_CALL; + + nr_php_scope_release(&this_var); +} +NR_PHP_WRAPPER_END + +#if ZEND_MODULE_API_NO < ZEND_8_0_X_API_NO \ + || defined OVERWRITE_ZEND_EXECUTE_DATA +/* + * Yii2: Report errors and exceptions when built-in ErrorHandler is enabled. + */ +NR_PHP_WRAPPER(nr_yii2_error_handler_wrapper) { + zval* exception = NULL; + + NR_UNUSED_SPECIALFN; + (void)wraprec; + + NR_PHP_WRAPPER_REQUIRE_FRAMEWORK(NR_FW_YII2); + + exception = nr_php_arg_get(1, NR_EXECUTE_ORIG_ARGS TSRMLS_CC); + if (!nr_php_is_zval_valid_object(exception)) { + nrl_verbosedebug(NRL_FRAMEWORK, "%s: exception is NULL or not an object", + __func__); + goto end; + } + + if (NR_SUCCESS + != nr_php_error_record_exception( + NRPRG(txn), exception, nr_php_error_get_priority(E_ERROR), true, + "Uncaught exception ", &NRPRG(exception_filters) TSRMLS_CC)) { + nrl_verbosedebug(NRL_FRAMEWORK, "%s: unable to record exception", __func__); + } + +end: + nr_php_arg_release(&exception); +} +NR_PHP_WRAPPER_END +#endif + +/* + * Enable Yii2 instrumentation. + */ +void nr_yii2_enable(TSRMLS_D) { +#if ZEND_MODULE_API_NO >= ZEND_8_0_X_API_NO \ + && !defined OVERWRITE_ZEND_EXECUTE_DATA + nr_php_wrap_user_function_before_after_clean( + NR_PSTR("yii\\base\\Action::runWithParams"), + nr_yii2_runWithParams_wrapper, NULL, NULL); + nr_php_wrap_user_function_before_after_clean( + NR_PSTR("yii\\base\\InlineAction::runWithParams"), + nr_yii2_runWithParams_wrapper, NULL, NULL); +#else + nr_php_wrap_user_function(NR_PSTR("yii\\base\\Action::runWithParams"), + nr_yii2_runWithParams_wrapper TSRMLS_CC); + nr_php_wrap_user_function(NR_PSTR("yii\\base\\InlineAction::runWithParams"), + nr_yii2_runWithParams_wrapper TSRMLS_CC); + /* + * Wrap Yii2 global error and exception handling methods. + * Given that: ErrorHandler::handleException(), ::handleError() and + * ::handleFatalError() all call ::logException($exception) at the right time, + * we will wrap this one to cover all cases. + * @see + * https://github.com/yiisoft/yii2/blob/master/framework/base/ErrorHandler.php + * + * Note: one can also set YII_ENABLE_ERROR_HANDLER constant to FALSE, this way + * allowing default PHP error handler to be intercepted by the NewRelic agent + * implementation. + */ + nr_php_wrap_user_function(NR_PSTR("yii\\base\\ErrorHandler::logException"), + nr_yii2_error_handler_wrapper TSRMLS_CC); #endif } diff --git a/agent/lib_guzzle6.c b/agent/lib_guzzle6.c index 0f131b5d0..9038c2aaf 100644 --- a/agent/lib_guzzle6.c +++ b/agent/lib_guzzle6.c @@ -58,6 +58,8 @@ #include "ext/standard/php_var.h" +#define PHP_PACKAGE_NAME "guzzlehttp/guzzle" + /* * Since Guzzle 6 requires PHP 5.5.0 or later, we just won't build the Guzzle 6 * support on older versions and will instead provide simple stubs for the two @@ -350,12 +352,18 @@ NR_PHP_WRAPPER_START(nr_guzzle6_client_construct) { zval* retval; zval* this_var = nr_php_scope_get(NR_EXECUTE_ORIG_ARGS); + char* version = nr_php_get_object_constant(this_var, "VERSION"); + if (NULL == version) { + version = nr_php_get_object_constant(this_var, "MAJOR_VERSION"); + } + if (NRINI(vulnerability_management_package_detection_enabled)) { - char* version = nr_php_get_object_constant(this_var, "VERSION"); // Add php package to transaction - nr_txn_add_php_package(NRPRG(txn), "guzzlehttp/guzzle", version); - nr_free(version); + nr_txn_add_php_package(NRPRG(txn), PHP_PACKAGE_NAME, version); } + nr_fw_support_add_package_supportability_metric(NRPRG(txn), PHP_PACKAGE_NAME, + version); + nr_free(version); (void)wraprec; NR_UNUSED_SPECIALFN; diff --git a/agent/lib_monolog.c b/agent/lib_monolog.c index 2216e1a06..667e33583 100644 --- a/agent/lib_monolog.c +++ b/agent/lib_monolog.c @@ -30,6 +30,9 @@ #define LOG_DECORATE_PROC_FUNC_NAME \ "newrelic_phpagent_monolog_decorating_processor" +#define PHP_PACKAGE_NAME "monolog/monolog" +#define MAJOR_VERSION_LENGTH 8 + /* * Purpose : Convert Monolog\Logger::API to integer * @@ -373,6 +376,10 @@ NR_PHP_WRAPPER(nr_monolog_logger_addrecord) { api = nr_monolog_version(this_var TSRMLS_CC); timestamp = nr_monolog_get_timestamp(api, argc, NR_EXECUTE_ORIG_ARGS TSRMLS_CC); + char version[MAJOR_VERSION_LENGTH]; + snprintf(version, sizeof(version), "%d", api); + nr_fw_support_add_package_supportability_metric(NRPRG(txn), + PHP_PACKAGE_NAME, version); } /* Record the log event */ @@ -513,7 +520,7 @@ void nr_monolog_enable(TSRMLS_D) { nr_monolog_logger_addrecord TSRMLS_CC); if (NRINI(vulnerability_management_package_detection_enabled)) { - nr_txn_add_php_package(NRPRG(txn), "monolog/monolog", + nr_txn_add_php_package(NRPRG(txn), PHP_PACKAGE_NAME, PHP_PACKAGE_VERSION_UNKNOWN); } } diff --git a/agent/lib_predis.c b/agent/lib_predis.c index d4a287a03..862649d3b 100644 --- a/agent/lib_predis.c +++ b/agent/lib_predis.c @@ -19,6 +19,8 @@ #include "util_strings.h" #include "lib_predis_private.h" +#define PHP_PACKAGE_NAME "predis/predis" + /* * Predis instrumentation * ====================== @@ -646,12 +648,15 @@ NR_PHP_WRAPPER(nr_predis_client_construct) { (void)wraprec; NR_PHP_WRAPPER_CALL; + + char* version = nr_php_get_object_constant(scope, "VERSION"); if (NRINI(vulnerability_management_package_detection_enabled)) { - char* version = nr_php_get_object_constant(scope, "VERSION"); // Add php package to transaction - nr_txn_add_php_package(NRPRG(txn), "predis/predis", version); - nr_free(version); + nr_txn_add_php_package(NRPRG(txn), PHP_PACKAGE_NAME, version); } + nr_fw_support_add_package_supportability_metric(NRPRG(txn), PHP_PACKAGE_NAME, + version); + nr_free(version); /* * Grab the connection object from the client, since we actually instrument diff --git a/agent/php_agent.c b/agent/php_agent.c index 4d2fabf70..50d942b62 100644 --- a/agent/php_agent.c +++ b/agent/php_agent.c @@ -727,10 +727,15 @@ char* nr_php_get_object_constant(zval* app, const char* name) { if (nr_php_is_zval_valid_string(version)) { retval = nr_strndup(Z_STRVAL_P(version), Z_STRLEN_P(version)); + } else if (nr_php_is_zval_valid_integer(version)) { + zend_string* zstr = zend_long_to_str(Z_LVAL_P(version)); + retval = nr_strndup(ZSTR_VAL(zstr), ZSTR_LEN(zstr)); + zend_string_release(zstr); } else { - nrl_verbosedebug(NRL_FRAMEWORK, - "%s: expected VERSION be a valid string, got type %d", - __func__, Z_TYPE_P(version)); + nrl_verbosedebug( + NRL_FRAMEWORK, + "%s: expected VERSION to be a valid string or int, got type %d", + __func__, Z_TYPE_P(version)); } nr_php_zval_free(&version); diff --git a/agent/php_error.c b/agent/php_error.c index 59956d585..539911dcc 100644 --- a/agent/php_error.c +++ b/agent/php_error.c @@ -561,12 +561,36 @@ static int nr_php_should_record_error(int type, const char* format TSRMLS_DC) { return 0; } + /* + * For a the following error types: + * E_WARNING || E_CORE_WARNING || E_COMPILE_WARNING || E_USER_WARNING + * PHP triggers an exception if EH_THROW is toggled on and then immediately + * returns after throwing the exception. PHP 7 additionally triggers an exception + * for E_RECOVERABLE_ERROR. + * See for more info: + * https://github.com/php/php-src/blob/master/main/main.c In that case, we + * should not handle it, but we should exit and let the exception handler + * deal with it; otherwise, we could record an error even if an exception is + * caught. + */ +#if ZEND_MODULE_API_NO < ZEND_8_0_X_API_NO +#define E_ERRORS_THROWING_EXCEPTIONS (E_WARNING | E_CORE_WARNING | E_COMPILE_WARNING | E_USER_WARNING | E_RECOVERABLE_ERROR) +#else +#define E_ERRORS_THROWING_EXCEPTIONS (E_WARNING | E_CORE_WARNING | E_COMPILE_WARNING | E_USER_WARNING) +#endif + +#define E_THROWS_EXCEPTION(e) ((E_ERRORS_THROWING_EXCEPTIONS & e) == e) + + if (EG(error_handling) == EH_THROW && E_THROWS_EXCEPTION(type)) { + // let the exception handler deal with this error + return 0; + } + errprio = nr_php_error_get_priority(type); if (0 == errprio) { return 0; } - if (NR_SUCCESS != nr_txn_record_error_worthy(NRPRG(txn), errprio)) { return 0; } @@ -625,7 +649,6 @@ void nr_php_error_cb(int type, stack_json = nr_php_backtrace_to_json(0 TSRMLS_CC); errclass = nr_php_error_get_type_string(type); - nr_txn_record_error(NRPRG(txn), nr_php_error_get_priority(type), true, msg, errclass, stack_json); diff --git a/agent/php_execute.c b/agent/php_execute.c index 7bb875ec1..341502f6c 100644 --- a/agent/php_execute.c +++ b/agent/php_execute.c @@ -416,8 +416,9 @@ static const nr_framework_table_t all_frameworks[] = { {"WordPress", "wordpress", NR_PSTR("wp-config.php"), 0, nr_wordpress_enable, NR_FW_WORDPRESS}, - {"Yii", "yii", NR_PSTR("framework/yii.php"), 0, nr_yii_enable, NR_FW_YII}, - {"Yii", "yii", NR_PSTR("framework/yiilite.php"), 0, nr_yii_enable, NR_FW_YII}, + {"Yii", "yii", NR_PSTR("framework/yii.php"), 0, nr_yii1_enable, NR_FW_YII1}, + {"Yii", "yii", NR_PSTR("framework/yiilite.php"), 0, nr_yii1_enable, NR_FW_YII1}, + {"Yii2", "yii2", NR_PSTR("yii2/baseyii.php"), 0, nr_yii2_enable, NR_FW_YII2}, /* See above: Laminas, the successor to Zend, which shares much of the instrumentation implementation with Zend */ @@ -535,7 +536,6 @@ static nr_library_table_t libraries[] = { {"SilverStripe4", NR_PSTR("silverstripeserviceconfigurationlocator.php"), NULL}, {"Typo3", NR_PSTR("classes/typo3/flow/core/bootstrap.php"), NULL}, {"Typo3", NR_PSTR("typo3/sysext/core/classes/core/bootstrap.php"), NULL}, - {"Yii2", NR_PSTR("yii2/baseyii.php"), NULL}, /* * Other CMS (content management systems), detected only, but @@ -1946,6 +1946,14 @@ static void nr_php_instrument_func_begin(NR_EXECUTE_PROTO) { if (NULL == wraprec) { return; } + + /* Store information that the segment is exception handler segment directly in + * the segment, because exception handler can call restore_exception_handler, + * and that will reset is_exception_handler flag in the wraprec */ + if (wraprec->is_exception_handler) { + segment->is_exception_handler = 1; + } + /* * If a function needs to have arguments modified, do so in * nr_zend_call_oapi_special_before. @@ -2027,7 +2035,7 @@ static void nr_php_instrument_func_end(NR_EXECUTE_PROTO) { wraprec = segment->wraprec; - if (wraprec && wraprec->is_exception_handler) { + if (segment->is_exception_handler) { /* * After running the exception handler segment, create an error from * the exception it handled, and save the error in the transaction. diff --git a/agent/php_internal_instrument.c b/agent/php_internal_instrument.c index 15c43dcdd..821379edb 100644 --- a/agent/php_internal_instrument.c +++ b/agent/php_internal_instrument.c @@ -1358,15 +1358,24 @@ static void nr_php_prepared_prepare_general(INTERNAL_FUNCTION_PARAMETERS, nr_php_prepared_statement_save(return_value, extension, sqlstr, sqlstrlen TSRMLS_CC); + /* Record the current query link and SQL string if the right conditions exist + * Note if the SQL string is not explainable then the previous recorded query + * string (from the query previously using the same handle) needs to be + * cleared so that the previous string is not errantly retrieved and "EXPLAIN" + * run with it + */ + if ((0 == NRTXNGLOBAL(generating_explain_plan)) - && nr_php_mysqli_zval_is_stmt(return_value TSRMLS_CC) - && nr_php_mysqli_zval_is_link(conn_obj TSRMLS_CC) - && nr_php_explain_mysql_query_is_explainable(sqlstr, sqlstrlen)) { - nr_php_mysqli_query_set_link(Z_OBJ_HANDLE_P(return_value), - conn_obj TSRMLS_CC); + && nr_php_mysqli_zval_is_stmt(return_value) + && nr_php_mysqli_zval_is_link(conn_obj)) { + nr_php_mysqli_query_set_link(Z_OBJ_HANDLE_P(return_value), conn_obj); - nr_php_mysqli_query_set_query(Z_OBJ_HANDLE_P(return_value), sqlstr, - sqlstrlen TSRMLS_CC); + if (nr_php_explain_mysql_query_is_explainable(sqlstr, sqlstrlen)) { + nr_php_mysqli_query_set_query(Z_OBJ_HANDLE_P(return_value), sqlstr, + sqlstrlen); + } else { + nr_php_mysqli_query_clear_query(Z_OBJ_HANDLE_P(return_value)); + } } } diff --git a/agent/php_mysqli.c b/agent/php_mysqli.c index f818fdba4..b17fd2491 100644 --- a/agent/php_mysqli.c +++ b/agent/php_mysqli.c @@ -353,6 +353,31 @@ nr_status_t nr_php_mysqli_query_set_query(nr_php_object_handle_t handle, return NR_SUCCESS; } +nr_status_t nr_php_mysqli_query_clear_query(nr_php_object_handle_t handle) { + zval* metadata = NULL; + + /* If a metadata entry exists then clear the "query" tag from it. + * If an entry does not exist then nothing needs to be done. + */ + metadata = nr_php_mysqli_query_find(handle); + if (NULL == metadata) { + return NR_FAILURE; + } + + /* Clear the "query" element */ + nr_php_zend_hash_del(Z_ARRVAL_P(metadata), "query"); + + /* + * Since the query is cleared so must the bind parameters, so let's get rid of + * whatever's here. We'll ignore the return values, since if the keys don't + * already exist no harm is done. + */ + nr_php_zend_hash_del(Z_ARRVAL_P(metadata), "bind_args"); + nr_php_zend_hash_del(Z_ARRVAL_P(metadata), "bind_format"); + + return NR_SUCCESS; +} + int nr_php_mysqli_zval_is_link(const zval* zv TSRMLS_DC) { if (NULL == zv) { return 0; diff --git a/agent/php_mysqli.h b/agent/php_mysqli.h index ca4568ea5..03d42cf57 100644 --- a/agent/php_mysqli.h +++ b/agent/php_mysqli.h @@ -87,6 +87,15 @@ extern nr_status_t nr_php_mysqli_query_set_link( nr_php_object_handle_t query_handle, zval* link TSRMLS_DC); +/* + * Purpose : Clear the SQL used to prepare a MySQLi statement. + * + * Params : 1. The object handle of the statement. + * + * Returns : NR_SUCCESS or NR_FAILURE. + */ +extern nr_status_t nr_php_mysqli_query_clear_query(nr_php_object_handle_t handle); + /* * Purpose : Save the SQL used to prepare a MySQLi statement. * diff --git a/agent/php_newrelic.h b/agent/php_newrelic.h index 4b55ae3b3..e114a6464 100644 --- a/agent/php_newrelic.h +++ b/agent/php_newrelic.h @@ -167,7 +167,8 @@ typedef enum { NR_FW_SYMFONY2, NR_FW_SYMFONY4, NR_FW_WORDPRESS, - NR_FW_YII, + NR_FW_YII1, + NR_FW_YII2, NR_FW_ZEND, NR_FW_ZEND2, NR_FW_LAMINAS3, diff --git a/agent/php_nrini.c b/agent/php_nrini.c index 1a5d5c831..2ed62eb10 100644 --- a/agent/php_nrini.c +++ b/agent/php_nrini.c @@ -1896,7 +1896,7 @@ static PHP_INI_MH(nr_custom_events_max_samples_stored_mh) { return SUCCESS; } -#define DEFAULT_WORDPRESS_HOOKS_OPTIONS "all_callbacks" +#define DEFAULT_WORDPRESS_HOOKS_OPTIONS "plugin_callbacks" static PHP_INI_MH(nr_wordpress_hooks_options_mh) { nrinistr_t* p; diff --git a/agent/scripts/newrelic.ini.template b/agent/scripts/newrelic.ini.template index d720e83c0..0e5da6ab3 100644 --- a/agent/scripts/newrelic.ini.template +++ b/agent/scripts/newrelic.ini.template @@ -639,7 +639,7 @@ newrelic.daemon.logfile = "/var/log/newrelic/newrelic-daemon.log" ; Must be one of the following values: ; cakephp, codeigniter, drupal, drupal8, joomla, kohana, laravel, ; magento, magento2, mediawiki, slim, symfony2, symfony4, -; wordpress, yii, zend, zend2, no_framework +; wordpress, yii, yii2, zend, zend2, no_framework ; ; Note that "drupal" covers only Drupal 6 and 7 and "symfony2" ; now only supports Symfony 3.x. @@ -1169,17 +1169,17 @@ newrelic.daemon.logfile = "/var/log/newrelic/newrelic-daemon.log" ; Setting: newrelic.framework.wordpress.hooks.options ; Type : string (all_callbacks, plugin_callbacks, threshold) ; Scope : per-directory -; Default: all_callbacks +; Default: plugin_callbacks ; Info : Sets the options how WordPress hooks are instrumented. ; ; New Relic agent can provide different levels of insights into WordPress hooks. -; By default, all hook callbacks functions are instrumented ("all_callbacks"). -; To reduce agent's overhead it is possible to limit the instrumentation to only -; plugin/theme callbacks ("plugin_callbacks"). Third option is to monitor hooks -; without instrumenting callbacks ("threshold"). This option does not give insights -; about plugins/themes. +; By default, only plugin/theme callbacks are instrumented ("plugin_callbacks"). +; At the cost of increased agent's overhead it is possible to extend the +; instrumentation to all hook callbacks functions ("all_callbacks"). Third option +; is to monitor hooks without instrumenting callbacks ("threshold"). This option +; does not give insights about plugins/themes. ; -;newrelic.framework.wordpress.hooks.options = "all_callbacks" +;newrelic.framework.wordpress.hooks.options = "plugin_callbacks" ; Setting: newrelic.framework.wordpress.hooks.threshold ; Type : time specification string ("500ms", "1s750ms" etc) diff --git a/agent/tests/test_fw_support.c b/agent/tests/test_fw_support.c index 907330ee9..c8b8e021d 100644 --- a/agent/tests/test_fw_support.c +++ b/agent/tests/test_fw_support.c @@ -13,8 +13,16 @@ tlib_parallel_info_t parallel_info static void test_fw_supportability_metrics(void) { #define LIBRARY_NAME "php-package" +#define LIBRARY_MAJOR_VERSION "7" +#define LIBRARY_MAJOR_VERSION_2 "10" +#define LIBRARY_MAJOR_VERSION_3 "100" +#define LIBRARY_MAJOR_VERSION_4 "1.23" +#define LIBRARY_MAJOR_VERSION_5 "12.34" +#define LIBRARY_MAJOR_VERSION_6 "123.45" +#define LIBRARY_MAJOR_VERSION_7 "0.4.5" #define LIBRARY_METRIC "Supportability/library/" LIBRARY_NAME "/detected" #define LOGGING_LIBRARY_METRIC "Supportability/Logging/PHP/" LIBRARY_NAME +#define PACKAGE_METRIC "Supportability/PHP/package/" LIBRARY_NAME nrtxn_t t; nrtxn_t* txn = &t; txn->unscoped_metrics = nrm_table_create(10); @@ -36,6 +44,18 @@ static void test_fw_supportability_metrics(void) { tlib_pass_if_int_equal("NULL logging library metric not created", 0, nrm_table_size(txn->unscoped_metrics)); + nr_fw_support_add_package_supportability_metric(NULL, LIBRARY_NAME, LIBRARY_MAJOR_VERSION); + tlib_pass_if_int_equal("package metric not created in NULL metrics", + 0, nrm_table_size(txn->unscoped_metrics)); + + nr_fw_support_add_package_supportability_metric(txn, NULL, LIBRARY_MAJOR_VERSION); + tlib_pass_if_int_equal("NULL package name, metric not created", 0, + nrm_table_size(txn->unscoped_metrics)); + + nr_fw_support_add_package_supportability_metric(txn, LIBRARY_NAME, NULL); + tlib_pass_if_int_equal("NULL major version, metric not created", 0, + nrm_table_size(txn->unscoped_metrics)); + /* Happy path */ nr_fw_support_add_library_supportability_metric(txn, LIBRARY_NAME); tlib_pass_if_not_null("happy path: library metric created", @@ -51,6 +71,55 @@ static void test_fw_supportability_metrics(void) { "happy path: logging library metric created", nrm_find(txn->unscoped_metrics, LOGGING_LIBRARY_METRIC "/disabled")); + nr_fw_support_add_package_supportability_metric(txn, LIBRARY_NAME, + LIBRARY_MAJOR_VERSION); + tlib_pass_if_not_null("happy path test 1: package metric created", + nrm_find(txn->unscoped_metrics, PACKAGE_METRIC + "/" LIBRARY_MAJOR_VERSION "/detected")); + + nr_fw_support_add_package_supportability_metric(txn, LIBRARY_NAME, + LIBRARY_MAJOR_VERSION_2); + tlib_pass_if_not_null("happy path test 2: package metric created", + nrm_find(txn->unscoped_metrics, PACKAGE_METRIC + "/" LIBRARY_MAJOR_VERSION_2 "/detected")); + + nr_fw_support_add_package_supportability_metric(txn, LIBRARY_NAME, + LIBRARY_MAJOR_VERSION_3); + tlib_pass_if_not_null("happy path test 3: package metric created", + nrm_find(txn->unscoped_metrics, PACKAGE_METRIC + "/" LIBRARY_MAJOR_VERSION_3 "/detected")); + + nr_fw_support_add_package_supportability_metric(txn, LIBRARY_NAME, + LIBRARY_MAJOR_VERSION_4); + tlib_pass_if_not_null( + "happy path test 4: package metric created", + nrm_find(txn->unscoped_metrics, PACKAGE_METRIC "/1/detected")); + + nr_fw_support_add_package_supportability_metric(txn, LIBRARY_NAME, + LIBRARY_MAJOR_VERSION_5); + tlib_pass_if_not_null( + "happy path test 5: package metric created", + nrm_find(txn->unscoped_metrics, PACKAGE_METRIC "/12/detected")); + + nr_fw_support_add_package_supportability_metric(txn, LIBRARY_NAME, + LIBRARY_MAJOR_VERSION_6); + tlib_pass_if_not_null( + "happy path test 6: package metric created", + nrm_find(txn->unscoped_metrics, PACKAGE_METRIC "/123/detected")); + + nr_fw_support_add_package_supportability_metric(txn, LIBRARY_NAME, + LIBRARY_MAJOR_VERSION_7); + tlib_pass_if_not_null( + "happy path test 7: package metric created", + nrm_find(txn->unscoped_metrics, PACKAGE_METRIC "/0/detected")); + + NRINI(force_framework) = true; + nr_fw_support_add_package_supportability_metric(txn, LIBRARY_NAME, + LIBRARY_MAJOR_VERSION); + tlib_pass_if_not_null( + "happy path test 8: package metric created", + nrm_find(txn->unscoped_metrics, PACKAGE_METRIC "/7/forced")); + nrm_table_destroy(&txn->unscoped_metrics); } diff --git a/axiom/nr_segment.h b/axiom/nr_segment.h index 5d68e9226..56d972579 100644 --- a/axiom/nr_segment.h +++ b/axiom/nr_segment.h @@ -192,6 +192,8 @@ typedef struct _nr_segment_t { */ void* wraprec; /* wraprec, if one is associated with this segment, to reduce wraprec lookups */ + int is_exception_handler; /* 1 if segment is associated with exception + handler, 0 otherwise */ #endif } nr_segment_t; diff --git a/axiom/nr_txn.h b/axiom/nr_txn.h index 01f085624..dc2cf014b 100644 --- a/axiom/nr_txn.h +++ b/axiom/nr_txn.h @@ -1161,7 +1161,8 @@ static inline nr_segment_t* nr_txn_allocate_segment(nrtxn_t* txn) { } /* - * Purpose : Add php packages to transaction + * Purpose : Add php packages to transaction. This function should only be + * called when Vulnerability Management is enabled. * * Params : 1. The transaction * 2. Package name diff --git a/axiom/nr_version.c b/axiom/nr_version.c index f6d191855..9cab7b786 100644 --- a/axiom/nr_version.c +++ b/axiom/nr_version.c @@ -23,7 +23,6 @@ /* * Current version naming scheme is flowers * - * zomp 02Mar2022 (9.19) * allium 14Mar2022 (9.20) * buttercup 26Apr2022 (9.21) * cosmos 29Jun2022 (10.0) @@ -44,9 +43,10 @@ * rose 20Dec2023 (10.15) * snapdragon 23Jan2024 (10.16) * tulip 21Feb2024 (10.17) - * ulmux 04Mar2024 (10.18) + * ulmus 04Mar2024 (10.18) + * viburnum 18Mar2024 (10.19) */ -#define NR_CODENAME "viburnum" +#define NR_CODENAME "wallflower" const char* nr_version(void) { return NR_STR2(NR_VERSION); diff --git a/daemon/go.mod b/daemon/go.mod index 35fc8e742..06d57f2a1 100644 --- a/daemon/go.mod +++ b/daemon/go.mod @@ -5,13 +5,13 @@ go 1.21.1 require ( github.com/golang/protobuf v1.5.3 github.com/google/flatbuffers v23.5.26+incompatible - golang.org/x/net v0.20.0 + golang.org/x/net v0.23.0 google.golang.org/grpc v1.61.0 - google.golang.org/protobuf v1.32.0 + google.golang.org/protobuf v1.33.0 ) require ( - golang.org/x/sys v0.16.0 // indirect + golang.org/x/sys v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17 // indirect ) diff --git a/daemon/go.sum b/daemon/go.sum index 1cbd55602..f7f322d87 100644 --- a/daemon/go.sum +++ b/daemon/go.sum @@ -6,10 +6,10 @@ github.com/google/flatbuffers v23.5.26+incompatible/go.mod h1:1AeVuKshWv4vARoZat github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo= -golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= -golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU= -golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -19,5 +19,5 @@ google.golang.org/grpc v1.61.0 h1:TOvOcuXn30kRao+gfcvsebNEa5iZIiLkisYEkf7R7o0= google.golang.org/grpc v1.61.0/go.mod h1:VUbo7IFqmF1QtCAstipjG0GIoq49KvMe9+h1jFLBNJs= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= -google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= diff --git a/daemon/internal/newrelic/app.go b/daemon/internal/newrelic/app.go index 843c5ff98..5f39e553e 100644 --- a/daemon/internal/newrelic/app.go +++ b/daemon/internal/newrelic/app.go @@ -146,6 +146,7 @@ type App struct { HarvestTrigger HarvestTriggerFunc LastActivity time.Time Rules MetricRules + PhpPackages map[PhpPackagesKey]struct{} } func (app *App) String() string { @@ -180,6 +181,7 @@ func NewApp(info *AppInfo) *App { info: info, HarvestTrigger: nil, LastActivity: now, + PhpPackages: make(map[PhpPackagesKey]struct{}), } } @@ -303,10 +305,10 @@ func (app *App) NeedsConnectAttempt(now time.Time, backoff time.Duration) bool { return false } -//Since span events are not included in Faster Event Harvest due to concerns -//about downsampling within a distributed trace, the report period and harvest -//limit are reported separately in span_event_harvest_config instead of -//event_harvest_config. Combine them both into EventHarvestConfig here. +// Since span events are not included in Faster Event Harvest due to concerns +// about downsampling within a distributed trace, the report period and harvest +// limit are reported separately in span_event_harvest_config instead of +// event_harvest_config. Combine them both into EventHarvestConfig here. func combineEventConfig(ehc collector.EventHarvestConfig, sehc collector.SpanEventHarvestConfig) collector.EventHarvestConfig { ehc.EventConfigs.SpanEventConfig.Limit = sehc.SpanEventConfig.Limit ehc.EventConfigs.SpanEventConfig.ReportPeriod = sehc.SpanEventConfig.ReportPeriod @@ -338,3 +340,78 @@ func (app *App) Inactive(threshold time.Duration) bool { } return time.Since(app.LastActivity) > threshold } + +// filter seen php packages data to avoid sending duplicates +// +// the `App` structure contains a map of PHP Packages the reporting +// application has encountered. +// +// the map of packages should persist for the duration of the +// current connection +// +// takes the `PhpPackages.data` byte array as input and unmarshals +// into an anonymous interface array +// +// the JSON format received from the agent is: +// +// [["package_name","version",{}],...] +// +// for each entry, assign the package name and version to the `PhpPackagesKey` +// struct and use the key to verify data does not exist in the map. If the +// key does not exist, add it to the map and the array of 'new' packages. +// +// convert the array of 'new' packages into a byte array representing +// the expected data that should match input, minus the duplicates. +func (app *App) filterPhpPackages(data []byte) []byte { + if data == nil { + return nil + } + + var pkgKey PhpPackagesKey + var newPkgs []PhpPackagesKey + var x []interface{} + + err := json.Unmarshal(data, &x) + if nil != err { + log.Errorf("failed to unmarshal php package json: %s", err) + return nil + } + + for _, pkgJson := range x { + pkg, _ := pkgJson.([]interface{}) + if len(pkg) != 3 { + log.Errorf("invalid php package json structure: %+v", pkg) + return nil + } + name, ok := pkg[0].(string) + version, ok := pkg[1].(string) + pkgKey = PhpPackagesKey{name, version} + _, ok = app.PhpPackages[pkgKey] + if !ok { + app.PhpPackages[pkgKey] = struct{}{} + newPkgs = append(newPkgs, pkgKey) + } + } + + if newPkgs == nil { + return nil + } + + buf := &bytes.Buffer{} + buf.WriteString(`[`) + for _, pkg := range newPkgs { + buf.WriteString(`["`) + buf.WriteString(pkg.Name) + buf.WriteString(`","`) + buf.WriteString(pkg.Version) + buf.WriteString(`",{}],`) + } + + resJson := buf.Bytes() + + // swap last ',' character with ']' + resJson = resJson[:len(resJson)-1] + resJson = append(resJson, ']') + + return resJson +} diff --git a/daemon/internal/newrelic/app_test.go b/daemon/internal/newrelic/app_test.go index b61e5304f..2096f4802 100644 --- a/daemon/internal/newrelic/app_test.go +++ b/daemon/internal/newrelic/app_test.go @@ -613,3 +613,54 @@ func TestMaxPayloadSizeInBytesFromConnectReply(t *testing.T) { t.Errorf("parseConnectReply(something), got [%v], expected [%v]", c.MaxPayloadSizeInBytes, expectedMaxPayloadSizeInBytes) } } + +func TestFilterPhpPackages(t *testing.T) { + app := App{ + PhpPackages: make(map[PhpPackagesKey]struct{}), + } + var nilData []byte = nil + emptyData := []byte(`[[{}]]`) + validData := []byte(`[["drupal","6.0",{}]]`) + moreValidData := []byte(`[["wordpress","7.0",{}],["symfony","5.1",{}]]`) + duplicateData := []byte(`[["drupal","6.0",{}]]`) + versionData := []byte(`[["drupal","9.0",{}]]`) + invalidData := []byte(`[[["1","2","3"],["4","5"]{}]]`) + + filteredData := app.filterPhpPackages(nilData) + if filteredData != nil { + t.Errorf("expected 'nil' result on 'nil' input, got [%v]", filteredData) + } + + filteredData = app.filterPhpPackages(emptyData) + if filteredData != nil { + t.Errorf("expected 'nil' result on empty data input, got [%v]", filteredData) + } + + expect := []byte(`[["drupal","6.0",{}]]`) + filteredData = app.filterPhpPackages(validData) + if string(filteredData) != string(expect) { + t.Errorf("expected [%v], got [%v]", string(expect), string(filteredData)) + } + + expect = []byte(`[["wordpress","7.0",{}],["symfony","5.1",{}]]`) + filteredData = app.filterPhpPackages(moreValidData) + if string(filteredData) != string(expect) { + t.Errorf("expected [%v], got [%v]", string(expect), string(filteredData)) + } + + filteredData = app.filterPhpPackages(duplicateData) + if filteredData != nil { + t.Errorf("expected 'nil', got [%v]", filteredData) + } + + expect = []byte(`[["drupal","9.0",{}]]`) + filteredData = app.filterPhpPackages(versionData) + if string(filteredData) != string(expect) { + t.Errorf("expected [%v], got [%v]", string(expect), string(filteredData)) + } + + filteredData = app.filterPhpPackages(invalidData) + if filteredData != nil { + t.Errorf("expected 'nil', go [%v]", filteredData) + } +} diff --git a/daemon/internal/newrelic/harvest_test.go b/daemon/internal/newrelic/harvest_test.go index 02d8abd40..758bf0111 100644 --- a/daemon/internal/newrelic/harvest_test.go +++ b/daemon/internal/newrelic/harvest_test.go @@ -234,4 +234,19 @@ func TestHarvestEmpty(t *testing.T) { if h.empty() { t.Errorf("Harvest.empty() = true, want false") } + + // verify that php packages does not send harvest when data is nil + h = NewHarvest(startTime, collector.NewHarvestLimits(nil)) + h.PhpPackages.AddPhpPackagesFromData(nil) + if !h.empty() { + t.Errorf("Harvest.empty = false, want true") + } + + // verify that valid php package data sends a harvest + h = NewHarvest(startTime, collector.NewHarvestLimits(nil)) + h.PhpPackages.AddPhpPackagesFromData([]byte(`[["testpackage","testversion",{}]]`)) + if h.empty() { + t.Errorf("Harvest.empty = true, want false") + } + } diff --git a/daemon/internal/newrelic/php_packages.go b/daemon/internal/newrelic/php_packages.go index bf6397f5b..0e82e0648 100644 --- a/daemon/internal/newrelic/php_packages.go +++ b/daemon/internal/newrelic/php_packages.go @@ -13,6 +13,11 @@ import ( "github.com/newrelic/newrelic-php-agent/daemon/internal/newrelic/log" ) +type PhpPackagesKey struct { + Name string + Version string +} + // phpPackages represents all detected packages reported by an agent. type PhpPackages struct { numSeen int diff --git a/daemon/internal/newrelic/processor.go b/daemon/internal/newrelic/processor.go index 96d07f0b3..9b00cee1a 100644 --- a/daemon/internal/newrelic/processor.go +++ b/daemon/internal/newrelic/processor.go @@ -673,6 +673,8 @@ func harvestByType(ah *AppHarvest, args *harvestArgs, ht HarvestType, du_chan ch // In such cases, harvest all types and return. if ht&HarvestAll == HarvestAll { ah.Harvest = NewHarvest(time.Now(), ah.App.connectReply.EventHarvestConfig.EventConfigs) + // filter already seen php packages + harvest.PhpPackages.data = ah.App.filterPhpPackages(harvest.PhpPackages.data) if args.blocking { // Invoked primarily by CleanExit harvestAll(harvest, args, ah.connectReply.EventHarvestConfig, ah.TraceObserver, du_chan) @@ -698,6 +700,7 @@ func harvestByType(ah *AppHarvest, args *harvestArgs, ht HarvestType, du_chan ch slowSQLs := harvest.SlowSQLs txnTraces := harvest.TxnTraces phpPackages := harvest.PhpPackages + phpPackages.data = ah.App.filterPhpPackages(phpPackages.data) harvest.Metrics = NewMetricTable(limits.MaxMetrics, time.Now()) harvest.Errors = NewErrorHeap(limits.MaxErrors) diff --git a/daemon/internal/newrelic/processor_test.go b/daemon/internal/newrelic/processor_test.go index 1025439cc..4910535ab 100644 --- a/daemon/internal/newrelic/processor_test.go +++ b/daemon/internal/newrelic/processor_test.go @@ -64,7 +64,7 @@ var ( sampleSpanEvent = []byte("belated birthday") sampleLogEvent = []byte("log event test birthday") sampleErrorEvent = []byte("forgotten birthday") - samplePhpPackages = []byte(`["package", "1.2.3",{}]`) + samplePhpPackages = []byte(`[["package","1.2.3",{}]]`) ) type ClientReturn struct { @@ -297,9 +297,11 @@ func TestProcessorHarvestDefaultDataPhpPackages(t *testing.T) { // collect php packages m.clientReturn <- ClientReturn{nil, nil, 202} cp_pkgs := <-m.clientParams + // collect metrics m.clientReturn <- ClientReturn{nil, nil, 202} cp_metrics := <-m.clientParams + // collect usage metrics m.clientReturn <- ClientReturn{nil, nil, 202} cp_usage := <-m.clientParams @@ -308,7 +310,7 @@ func TestProcessorHarvestDefaultDataPhpPackages(t *testing.T) { // check pkgs and metric data - it appears these can // come in different orders so check both - toTestPkgs := `["Jars",["package", "1.2.3",{}]]` + toTestPkgs := `["Jars",[["package","1.2.3",{}]]]` if toTestPkgs != string(cp_pkgs.data) { if toTestPkgs != string(cp_metrics.data) { t.Fatalf("packages data: expected '%s', got '%s'", toTestPkgs, string(cp_pkgs.data)) @@ -318,9 +320,9 @@ func TestProcessorHarvestDefaultDataPhpPackages(t *testing.T) { time1 := strings.Split(string(cp_usage.data), ",")[1] time2 := strings.Split(string(cp_usage.data), ",")[2] usageMetrics := `["one",` + time1 + `,` + time2 + `,` + - `[[{"name":"Supportability/C/Collector/Output/Bytes"},[2,1285,0,0,0,0]],` + + `[[{"name":"Supportability/C/Collector/Output/Bytes"},[2,1286,0,0,0,0]],` + `[{"name":"Supportability/C/Collector/metric_data/Output/Bytes"},[1,1253,0,0,0,0]],` + - `[{"name":"Supportability/C/Collector/update_loaded_modules/Output/Bytes"},[1,32,0,0,0,0]]]]` + `[{"name":"Supportability/C/Collector/update_loaded_modules/Output/Bytes"},[1,33,0,0,0,0]]]]` if got, _ := OrderScrubMetrics(cp_usage.data, nil); string(got) != usageMetrics { t.Fatalf("metrics data: expected '%s', got '%s'", string(usageMetrics), string(got)) } diff --git a/daemon/internal/newrelic/utilization/utilization_hash.go b/daemon/internal/newrelic/utilization/utilization_hash.go index f12c29148..7791dfee8 100644 --- a/daemon/internal/newrelic/utilization/utilization_hash.go +++ b/daemon/internal/newrelic/utilization/utilization_hash.go @@ -55,7 +55,7 @@ type Data struct { } type docker struct { - ID string `json:"id",omitempty` + ID string `json:"id,omitempty"` } type vendors struct { diff --git a/tests/integration/errors/test_EH_THROW_errors_caught_exception.php b/tests/integration/errors/test_EH_THROW_errors_caught_exception.php new file mode 100644 index 000000000..8aaff4a3f --- /dev/null +++ b/tests/integration/errors/test_EH_THROW_errors_caught_exception.php @@ -0,0 +1,69 @@ +getMessage()); +} diff --git a/tests/integration/errors/test_EH_THROW_errors_uncaught_exception.php b/tests/integration/errors/test_EH_THROW_errors_uncaught_exception.php new file mode 100644 index 000000000..1d277d874 --- /dev/null +++ b/tests/integration/errors/test_EH_THROW_errors_uncaught_exception.php @@ -0,0 +1,112 @@ +propName); + +//trigger an error that is not handled by the custom error handler +trigger_error("Let this serve as a deprecation", E_USER_DEPRECATED); + + diff --git a/tests/integration/errors/test_error_handler_with_strings.php b/tests/integration/errors/test_error_handler_with_strings.php new file mode 100644 index 000000000..a541d257e --- /dev/null +++ b/tests/integration/errors/test_error_handler_with_strings.php @@ -0,0 +1,81 @@ +propName); + +// generate "Attempt to read property" error +$bar = false; +echo ($bar->var); + +// generate "Undefined array key" error +$missingOneArray = array(2=>'two', 4=>'four'); +echo $missingOneArray[1]; + + + diff --git a/tests/integration/errors/test_error_handler_with_strings.php7.php b/tests/integration/errors/test_error_handler_with_strings.php7.php new file mode 100644 index 000000000..dba203539 --- /dev/null +++ b/tests/integration/errors/test_error_handler_with_strings.php7.php @@ -0,0 +1,57 @@ +propName); + + + diff --git a/tests/integration/errors/test_uncaught_handled_exception_01.php b/tests/integration/errors/test_uncaught_handled_exception_01.php new file mode 100644 index 000000000..75b6ee3f4 --- /dev/null +++ b/tests/integration/errors/test_uncaught_handled_exception_01.php @@ -0,0 +1,170 @@ +=")) { + die("skip: PHP >= 8.3.0 not supported\n"); +} +*/ + + +/*EXPECT_ERROR_EVENTS*/ +/* +[ + "?? agent run id", + { + "reservoir_size": "??", + "events_seen": 1 + }, + [ + [ + { + "type": "TransactionError", + "timestamp": "??", + "error.class": "RuntimeException", + "error.message": "Uncaught exception 'RuntimeException' with message 'Expected unexpected happened' in __FILE__:??", + "transactionName": "OtherTransaction\/php__FILE__", + "duration": "??", + "nr.transactionGuid": "??", + "guid": "??", + "sampled": true, + "priority": "??", + "traceId": "??", + "spanId": "??" + }, + {}, + "??" + ] + ] +] +*/ + +/*EXPECT_SPAN_EVENTS*/ +/* +[ + "?? agent run id", + { + "reservoir_size": 10000, + "events_seen": 4 + }, + [ + [ + { + "category": "generic", + "type": "Span", + "guid": "??", + "traceId": "??", + "transactionId": "??", + "name": "OtherTransaction\/php__FILE__", + "timestamp": "??", + "duration": "??", + "priority": "??", + "sampled": true, + "nr.entryPoint": true, + "transaction.name": "OtherTransaction\/php__FILE__" + }, + {}, + {} + ], + [ + { + "category": "generic", + "type": "Span", + "guid": "??", + "traceId": "??", + "transactionId": "??", + "name": "Custom\/call_throw_it", + "timestamp": "??", + "duration": "??", + "priority": "??", + "sampled": true, + "parentId": "??" + }, + {}, + { + "error.message": "Uncaught exception 'RuntimeException' with message 'Expected unexpected happened' in __FILE__:??", + "error.class": "RuntimeException" + } + ], + [ + { + "category": "generic", + "type": "Span", + "guid": "??", + "traceId": "??", + "transactionId": "??", + "name": "Custom\/throw_it", + "timestamp": "??", + "duration": "??", + "priority": "??", + "sampled": true, + "parentId": "??" + }, + {}, + { + "error.message": "Uncaught exception 'RuntimeException' with message 'Expected unexpected happened' in __FILE__:??", + "error.class": "RuntimeException" + } + ], + [ + { + "category": "generic", + "type": "Span", + "guid": "??", + "traceId": "??", + "transactionId": "??", + "name": "Custom\/user_exception_handler_02", + "timestamp": "??", + "duration": "??", + "priority": "??", + "sampled": true, + "parentId": "??" + }, + {}, + {} + ] + ] +] +*/ + + +/*EXPECT_REGEX +Fatal error: Uncaught RuntimeException: Not able to handle, throwing another exception from handler +*/ + +function user_exception_handler_01(Throwable $ex) { + echo "01 Handled uncaught exception"; +} + +function user_exception_handler_02(Throwable $ex) { + restore_exception_handler(); + throw new RuntimeException("Not able to handle, throwing another exception from handler"); + echo "Should never see this"; +} + +function throw_it() { + throw new RuntimeException('Expected unexpected happened'); +} + +function call_throw_it() { + throw_it(); +} + +set_exception_handler('user_exception_handler_01'); +set_exception_handler('user_exception_handler_02'); + +call_throw_it(); diff --git a/tests/integration/errors/test_uncaught_handled_exception_04.php83a.php b/tests/integration/errors/test_uncaught_handled_exception_04.php83a.php new file mode 100644 index 000000000..b71d37150 --- /dev/null +++ b/tests/integration/errors/test_uncaught_handled_exception_04.php83a.php @@ -0,0 +1,184 @@ +=")) { + die("skip: PHP >= 8.3.5 not supported\n"); +} +*/ + + +/*EXPECT_ERROR_EVENTS*/ +/* +[ + "?? agent run id", + { + "reservoir_size": "??", + "events_seen": 1 + }, + [ + [ + { + "type": "TransactionError", + "timestamp": "??", + "error.class": "RuntimeException", + "error.message": "Uncaught exception 'RuntimeException' with message 'Expected unexpected happened' in __FILE__:??", + "transactionName": "OtherTransaction\/php__FILE__", + "duration": "??", + "nr.transactionGuid": "??", + "guid": "??", + "sampled": true, + "priority": "??", + "traceId": "??", + "spanId": "??" + }, + {}, + "??" + ] + ] +] +*/ + +/*EXPECT_SPAN_EVENTS*/ +/* +[ + "?? agent run id", + { + "reservoir_size": 10000, + "events_seen": 4 + }, + [ + [ + { + "category": "generic", + "type": "Span", + "guid": "??", + "traceId": "??", + "transactionId": "??", + "name": "OtherTransaction\/php__FILE__", + "timestamp": "??", + "duration": "??", + "priority": "??", + "sampled": true, + "nr.entryPoint": true, + "transaction.name": "OtherTransaction\/php__FILE__" + }, + {}, + {} + ], + [ + { + "category": "generic", + "type": "Span", + "guid": "??", + "traceId": "??", + "transactionId": "??", + "name": "Custom\/call_throw_it", + "timestamp": "??", + "duration": "??", + "priority": "??", + "sampled": true, + "parentId": "??" + }, + {}, + { + "error.message": "Uncaught exception 'RuntimeException' with message 'Expected unexpected happened' in __FILE__:??", + "error.class": "RuntimeException" + } + ], + [ + { + "category": "generic", + "type": "Span", + "guid": "??", + "traceId": "??", + "transactionId": "??", + "name": "Custom\/throw_it", + "timestamp": "??", + "duration": "??", + "priority": "??", + "sampled": true, + "parentId": "??" + }, + {}, + { + "error.message": "Uncaught exception 'RuntimeException' with message 'Expected unexpected happened' in __FILE__:??", + "error.class": "RuntimeException" + } + ], + [ + { + "category": "generic", + "type": "Span", + "guid": "??", + "traceId": "??", + "transactionId": "??", + "name": "Custom\/user_exception_handler_02", + "timestamp": "??", + "duration": "??", + "priority": "??", + "sampled": true, + "parentId": "??" + }, + {}, + {} + ] + ] +] +*/ + + +/*EXPECT_REGEX +01 Handled uncaught exception +*/ + +function user_exception_handler_01(Throwable $ex) { + echo "01 Handled uncaught exception"; +} + +function user_exception_handler_02(Throwable $ex) { + restore_exception_handler(); + throw new RuntimeException("Not able to handle, throwing another exception from handler"); + echo "Should never see this"; +} + +function throw_it() { + throw new RuntimeException('Expected unexpected happened'); +} + +function call_throw_it() { + throw_it(); +} + +set_exception_handler('user_exception_handler_01'); +set_exception_handler('user_exception_handler_02'); + +call_throw_it(); diff --git a/tests/integration/errors/test_uncaught_handled_exception_04.php83b.php b/tests/integration/errors/test_uncaught_handled_exception_04.php83b.php new file mode 100644 index 000000000..54f949619 --- /dev/null +++ b/tests/integration/errors/test_uncaught_handled_exception_04.php83b.php @@ -0,0 +1,177 @@ +runWithParams([]); diff --git a/tests/integration/frameworks/yii/test_basic_web.php b/tests/integration/frameworks/yii/test_basic_web.php new file mode 100644 index 000000000..b03af867c --- /dev/null +++ b/tests/integration/frameworks/yii/test_basic_web.php @@ -0,0 +1,22 @@ +runWithParams([]); diff --git a/tests/integration/frameworks/yii/yii2/baseyii.php b/tests/integration/frameworks/yii/yii2/baseyii.php new file mode 100644 index 000000000..f884c6853 --- /dev/null +++ b/tests/integration/frameworks/yii/yii2/baseyii.php @@ -0,0 +1,46 @@ +uniqid = $argument; + } + + public function getUniqueId ( ) { + return $this->uniqid; + } + + public function runWithParams($params) { + return; + } + } + + /* Console action */ + class InlineAction { + private $uniqid; + + public function __construct($id) { + $this->uniqid = $id; + } + + public function getUniqueId ( ) { + return $this->uniqid; + } + + public function runWithParams($params) { + return; + } + } + echo ""; +} diff --git a/tests/integration/logging/monolog2/test_monolog_basic.php b/tests/integration/logging/monolog2/test_monolog_basic.php index 50003fb6e..b562bf15e 100644 --- a/tests/integration/logging/monolog2/test_monolog_basic.php +++ b/tests/integration/logging/monolog2/test_monolog_basic.php @@ -58,6 +58,7 @@ [{"name": "OtherTransactionTotalTime/php__FILE__"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/LocalDecorating/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/PHP/Monolog/enabled"}, [1, "??", "??", "??", "??", "??"]], + [{"name": "Supportability/PHP/package/monolog/monolog/2/detected"}, [8, "??", "??", "??", "??", "??"]], [{"name": "Supportability/library/Monolog/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/Forwarding/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/Metrics/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]] diff --git a/tests/integration/logging/monolog2/test_monolog_basic_clm.php b/tests/integration/logging/monolog2/test_monolog_basic_clm.php index 50f234e57..5ed62d3b3 100644 --- a/tests/integration/logging/monolog2/test_monolog_basic_clm.php +++ b/tests/integration/logging/monolog2/test_monolog_basic_clm.php @@ -45,6 +45,7 @@ [{"name": "OtherTransactionTotalTime"}, [1, "??", "??", "??", "??", "??"]], [{"name": "OtherTransactionTotalTime/php__FILE__"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/PHP/Monolog/enabled"}, [1, "??", "??", "??", "??", "??"]], + [{"name": "Supportability/PHP/package/monolog/monolog/2/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/library/Monolog/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/LocalDecorating/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/Forwarding/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], diff --git a/tests/integration/logging/monolog2/test_monolog_basic_clm_off.php b/tests/integration/logging/monolog2/test_monolog_basic_clm_off.php index c997317e7..3c656ac97 100644 --- a/tests/integration/logging/monolog2/test_monolog_basic_clm_off.php +++ b/tests/integration/logging/monolog2/test_monolog_basic_clm_off.php @@ -44,6 +44,7 @@ [{"name": "OtherTransactionTotalTime"}, [1, "??", "??", "??", "??", "??"]], [{"name": "OtherTransactionTotalTime/php__FILE__"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/PHP/Monolog/enabled"}, [1, "??", "??", "??", "??", "??"]], + [{"name": "Supportability/PHP/package/monolog/monolog/2/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/library/Monolog/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/LocalDecorating/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/Forwarding/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], diff --git a/tests/integration/logging/monolog2/test_monolog_cat.php b/tests/integration/logging/monolog2/test_monolog_cat.php index 97a61b77d..d96e38aec 100644 --- a/tests/integration/logging/monolog2/test_monolog_cat.php +++ b/tests/integration/logging/monolog2/test_monolog_cat.php @@ -56,6 +56,7 @@ [{"name": "OtherTransactionTotalTime"}, [1, "??", "??", "??", "??", "??"]], [{"name": "OtherTransactionTotalTime/php__FILE__"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/PHP/Monolog/enabled"}, [1, "??", "??", "??", "??", "??"]], + [{"name": "Supportability/PHP/package/monolog/monolog/2/detected"}, [8, "??", "??", "??", "??", "??"]], [{"name": "Supportability/library/Monolog/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/LocalDecorating/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/Forwarding/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], diff --git a/tests/integration/logging/monolog2/test_monolog_context_default.php b/tests/integration/logging/monolog2/test_monolog_context_default.php index 5fbc32cf0..859ce1ffe 100644 --- a/tests/integration/logging/monolog2/test_monolog_context_default.php +++ b/tests/integration/logging/monolog2/test_monolog_context_default.php @@ -44,6 +44,7 @@ [{"name": "OtherTransactionTotalTime"}, [1, "??", "??", "??", "??", "??"]], [{"name": "OtherTransactionTotalTime/php__FILE__"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/PHP/Monolog/enabled"}, [1, "??", "??", "??", "??", "??"]], + [{"name": "Supportability/PHP/package/monolog/monolog/2/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/library/Monolog/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/LocalDecorating/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/Forwarding/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], diff --git a/tests/integration/logging/monolog2/test_monolog_context_exception.php b/tests/integration/logging/monolog2/test_monolog_context_exception.php index 16b62e5b4..c806bddc8 100644 --- a/tests/integration/logging/monolog2/test_monolog_context_exception.php +++ b/tests/integration/logging/monolog2/test_monolog_context_exception.php @@ -46,6 +46,7 @@ [{"name": "OtherTransactionTotalTime"}, [1, "??", "??", "??", "??", "??"]], [{"name": "OtherTransactionTotalTime/php__FILE__"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/PHP/Monolog/enabled"}, [1, "??", "??", "??", "??", "??"]], + [{"name": "Supportability/PHP/package/monolog/monolog/2/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/library/Monolog/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/LocalDecorating/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/Forwarding/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], diff --git a/tests/integration/logging/monolog2/test_monolog_context_filter_extra1.php b/tests/integration/logging/monolog2/test_monolog_context_filter_extra1.php index fb318cdc3..13875a0a6 100644 --- a/tests/integration/logging/monolog2/test_monolog_context_filter_extra1.php +++ b/tests/integration/logging/monolog2/test_monolog_context_filter_extra1.php @@ -51,6 +51,7 @@ [{"name": "OtherTransactionTotalTime"}, [1, "??", "??", "??", "??", "??"]], [{"name": "OtherTransactionTotalTime/php__FILE__"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/PHP/Monolog/enabled"}, [1, "??", "??", "??", "??", "??"]], + [{"name": "Supportability/PHP/package/monolog/monolog/2/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/library/Monolog/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/LocalDecorating/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/Forwarding/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], diff --git a/tests/integration/logging/monolog2/test_monolog_context_filter_extra2.php b/tests/integration/logging/monolog2/test_monolog_context_filter_extra2.php index 5867f935c..b55735e92 100644 --- a/tests/integration/logging/monolog2/test_monolog_context_filter_extra2.php +++ b/tests/integration/logging/monolog2/test_monolog_context_filter_extra2.php @@ -51,6 +51,7 @@ [{"name": "OtherTransactionTotalTime"}, [1, "??", "??", "??", "??", "??"]], [{"name": "OtherTransactionTotalTime/php__FILE__"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/PHP/Monolog/enabled"}, [1, "??", "??", "??", "??", "??"]], + [{"name": "Supportability/PHP/package/monolog/monolog/2/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/library/Monolog/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/LocalDecorating/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/Forwarding/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], diff --git a/tests/integration/logging/monolog2/test_monolog_context_filter_extra3.php b/tests/integration/logging/monolog2/test_monolog_context_filter_extra3.php index 92812d6bd..e90245135 100644 --- a/tests/integration/logging/monolog2/test_monolog_context_filter_extra3.php +++ b/tests/integration/logging/monolog2/test_monolog_context_filter_extra3.php @@ -51,6 +51,7 @@ [{"name": "OtherTransactionTotalTime"}, [1, "??", "??", "??", "??", "??"]], [{"name": "OtherTransactionTotalTime/php__FILE__"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/PHP/Monolog/enabled"}, [1, "??", "??", "??", "??", "??"]], + [{"name": "Supportability/PHP/package/monolog/monolog/2/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/library/Monolog/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/LocalDecorating/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/Forwarding/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], diff --git a/tests/integration/logging/monolog2/test_monolog_context_filter_extra4.php b/tests/integration/logging/monolog2/test_monolog_context_filter_extra4.php index 84c0fdfcc..dc232b6dc 100644 --- a/tests/integration/logging/monolog2/test_monolog_context_filter_extra4.php +++ b/tests/integration/logging/monolog2/test_monolog_context_filter_extra4.php @@ -51,6 +51,7 @@ [{"name": "OtherTransactionTotalTime"}, [1, "??", "??", "??", "??", "??"]], [{"name": "OtherTransactionTotalTime/php__FILE__"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/PHP/Monolog/enabled"}, [1, "??", "??", "??", "??", "??"]], + [{"name": "Supportability/PHP/package/monolog/monolog/2/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/library/Monolog/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/LocalDecorating/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/Forwarding/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], diff --git a/tests/integration/logging/monolog2/test_monolog_context_filter_extra5.php b/tests/integration/logging/monolog2/test_monolog_context_filter_extra5.php index e29b78368..1d3934a1d 100644 --- a/tests/integration/logging/monolog2/test_monolog_context_filter_extra5.php +++ b/tests/integration/logging/monolog2/test_monolog_context_filter_extra5.php @@ -51,6 +51,7 @@ [{"name": "OtherTransactionTotalTime"}, [1, "??", "??", "??", "??", "??"]], [{"name": "OtherTransactionTotalTime/php__FILE__"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/PHP/Monolog/enabled"}, [1, "??", "??", "??", "??", "??"]], + [{"name": "Supportability/PHP/package/monolog/monolog/2/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/library/Monolog/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/LocalDecorating/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/Forwarding/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], diff --git a/tests/integration/logging/monolog2/test_monolog_context_filter_rule1.php b/tests/integration/logging/monolog2/test_monolog_context_filter_rule1.php index bebe8489b..0cb138798 100644 --- a/tests/integration/logging/monolog2/test_monolog_context_filter_rule1.php +++ b/tests/integration/logging/monolog2/test_monolog_context_filter_rule1.php @@ -51,6 +51,7 @@ [{"name": "OtherTransactionTotalTime"}, [1, "??", "??", "??", "??", "??"]], [{"name": "OtherTransactionTotalTime/php__FILE__"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/PHP/Monolog/enabled"}, [1, "??", "??", "??", "??", "??"]], + [{"name": "Supportability/PHP/package/monolog/monolog/2/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/library/Monolog/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/LocalDecorating/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/Forwarding/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], diff --git a/tests/integration/logging/monolog2/test_monolog_context_filter_rule10.php b/tests/integration/logging/monolog2/test_monolog_context_filter_rule10.php index 3a817bb7e..eeff02ad8 100644 --- a/tests/integration/logging/monolog2/test_monolog_context_filter_rule10.php +++ b/tests/integration/logging/monolog2/test_monolog_context_filter_rule10.php @@ -51,6 +51,7 @@ [{"name": "OtherTransactionTotalTime"}, [1, "??", "??", "??", "??", "??"]], [{"name": "OtherTransactionTotalTime/php__FILE__"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/PHP/Monolog/enabled"}, [1, "??", "??", "??", "??", "??"]], + [{"name": "Supportability/PHP/package/monolog/monolog/2/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/library/Monolog/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/LocalDecorating/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/Forwarding/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], diff --git a/tests/integration/logging/monolog2/test_monolog_context_filter_rule11.php b/tests/integration/logging/monolog2/test_monolog_context_filter_rule11.php index 71e268443..854579344 100644 --- a/tests/integration/logging/monolog2/test_monolog_context_filter_rule11.php +++ b/tests/integration/logging/monolog2/test_monolog_context_filter_rule11.php @@ -51,6 +51,7 @@ [{"name": "OtherTransactionTotalTime"}, [1, "??", "??", "??", "??", "??"]], [{"name": "OtherTransactionTotalTime/php__FILE__"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/PHP/Monolog/enabled"}, [1, "??", "??", "??", "??", "??"]], + [{"name": "Supportability/PHP/package/monolog/monolog/2/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/library/Monolog/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/LocalDecorating/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/Forwarding/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], diff --git a/tests/integration/logging/monolog2/test_monolog_context_filter_rule2.php b/tests/integration/logging/monolog2/test_monolog_context_filter_rule2.php index 87f4f3968..2b7847f73 100644 --- a/tests/integration/logging/monolog2/test_monolog_context_filter_rule2.php +++ b/tests/integration/logging/monolog2/test_monolog_context_filter_rule2.php @@ -51,6 +51,7 @@ [{"name": "OtherTransactionTotalTime"}, [1, "??", "??", "??", "??", "??"]], [{"name": "OtherTransactionTotalTime/php__FILE__"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/PHP/Monolog/enabled"}, [1, "??", "??", "??", "??", "??"]], + [{"name": "Supportability/PHP/package/monolog/monolog/2/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/library/Monolog/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/LocalDecorating/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/Forwarding/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], diff --git a/tests/integration/logging/monolog2/test_monolog_context_filter_rule3.php b/tests/integration/logging/monolog2/test_monolog_context_filter_rule3.php index bb65ea6b7..864173103 100644 --- a/tests/integration/logging/monolog2/test_monolog_context_filter_rule3.php +++ b/tests/integration/logging/monolog2/test_monolog_context_filter_rule3.php @@ -51,6 +51,7 @@ [{"name": "OtherTransactionTotalTime"}, [1, "??", "??", "??", "??", "??"]], [{"name": "OtherTransactionTotalTime/php__FILE__"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/PHP/Monolog/enabled"}, [1, "??", "??", "??", "??", "??"]], + [{"name": "Supportability/PHP/package/monolog/monolog/2/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/library/Monolog/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/LocalDecorating/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/Forwarding/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], diff --git a/tests/integration/logging/monolog2/test_monolog_context_filter_rule4.php b/tests/integration/logging/monolog2/test_monolog_context_filter_rule4.php index 09f13b10c..3f2f01cdd 100644 --- a/tests/integration/logging/monolog2/test_monolog_context_filter_rule4.php +++ b/tests/integration/logging/monolog2/test_monolog_context_filter_rule4.php @@ -51,6 +51,7 @@ [{"name": "OtherTransactionTotalTime"}, [1, "??", "??", "??", "??", "??"]], [{"name": "OtherTransactionTotalTime/php__FILE__"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/PHP/Monolog/enabled"}, [1, "??", "??", "??", "??", "??"]], + [{"name": "Supportability/PHP/package/monolog/monolog/2/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/library/Monolog/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/LocalDecorating/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/Forwarding/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], diff --git a/tests/integration/logging/monolog2/test_monolog_context_filter_rule5.php b/tests/integration/logging/monolog2/test_monolog_context_filter_rule5.php index 252180a7b..ed6e512b5 100644 --- a/tests/integration/logging/monolog2/test_monolog_context_filter_rule5.php +++ b/tests/integration/logging/monolog2/test_monolog_context_filter_rule5.php @@ -51,6 +51,7 @@ [{"name": "OtherTransactionTotalTime"}, [1, "??", "??", "??", "??", "??"]], [{"name": "OtherTransactionTotalTime/php__FILE__"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/PHP/Monolog/enabled"}, [1, "??", "??", "??", "??", "??"]], + [{"name": "Supportability/PHP/package/monolog/monolog/2/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/library/Monolog/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/LocalDecorating/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/Forwarding/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], diff --git a/tests/integration/logging/monolog2/test_monolog_context_filter_rule6.php b/tests/integration/logging/monolog2/test_monolog_context_filter_rule6.php index 799336ee5..22ec5cebe 100644 --- a/tests/integration/logging/monolog2/test_monolog_context_filter_rule6.php +++ b/tests/integration/logging/monolog2/test_monolog_context_filter_rule6.php @@ -51,6 +51,7 @@ [{"name": "OtherTransactionTotalTime"}, [1, "??", "??", "??", "??", "??"]], [{"name": "OtherTransactionTotalTime/php__FILE__"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/PHP/Monolog/enabled"}, [1, "??", "??", "??", "??", "??"]], + [{"name": "Supportability/PHP/package/monolog/monolog/2/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/library/Monolog/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/LocalDecorating/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/Forwarding/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], diff --git a/tests/integration/logging/monolog2/test_monolog_context_filter_rule7.php b/tests/integration/logging/monolog2/test_monolog_context_filter_rule7.php index 55bc44caa..f9be37447 100644 --- a/tests/integration/logging/monolog2/test_monolog_context_filter_rule7.php +++ b/tests/integration/logging/monolog2/test_monolog_context_filter_rule7.php @@ -51,6 +51,7 @@ [{"name": "OtherTransactionTotalTime"}, [1, "??", "??", "??", "??", "??"]], [{"name": "OtherTransactionTotalTime/php__FILE__"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/PHP/Monolog/enabled"}, [1, "??", "??", "??", "??", "??"]], + [{"name": "Supportability/PHP/package/monolog/monolog/2/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/library/Monolog/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/LocalDecorating/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/Forwarding/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], diff --git a/tests/integration/logging/monolog2/test_monolog_context_filter_rule8.php b/tests/integration/logging/monolog2/test_monolog_context_filter_rule8.php index d63c67184..9e36e3bcb 100644 --- a/tests/integration/logging/monolog2/test_monolog_context_filter_rule8.php +++ b/tests/integration/logging/monolog2/test_monolog_context_filter_rule8.php @@ -51,6 +51,7 @@ [{"name": "OtherTransactionTotalTime"}, [1, "??", "??", "??", "??", "??"]], [{"name": "OtherTransactionTotalTime/php__FILE__"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/PHP/Monolog/enabled"}, [1, "??", "??", "??", "??", "??"]], + [{"name": "Supportability/PHP/package/monolog/monolog/2/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/library/Monolog/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/LocalDecorating/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/Forwarding/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], diff --git a/tests/integration/logging/monolog2/test_monolog_context_filter_rule9.php b/tests/integration/logging/monolog2/test_monolog_context_filter_rule9.php index b1be23aec..ba6ba4cc7 100644 --- a/tests/integration/logging/monolog2/test_monolog_context_filter_rule9.php +++ b/tests/integration/logging/monolog2/test_monolog_context_filter_rule9.php @@ -51,6 +51,7 @@ [{"name": "OtherTransactionTotalTime"}, [1, "??", "??", "??", "??", "??"]], [{"name": "OtherTransactionTotalTime/php__FILE__"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/PHP/Monolog/enabled"}, [1, "??", "??", "??", "??", "??"]], + [{"name": "Supportability/PHP/package/monolog/monolog/2/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/library/Monolog/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/LocalDecorating/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/Forwarding/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], diff --git a/tests/integration/logging/monolog2/test_monolog_context_limits_1.php b/tests/integration/logging/monolog2/test_monolog_context_limits_1.php index 72245794f..a01498ead 100644 --- a/tests/integration/logging/monolog2/test_monolog_context_limits_1.php +++ b/tests/integration/logging/monolog2/test_monolog_context_limits_1.php @@ -45,6 +45,7 @@ [{"name": "OtherTransactionTotalTime"}, [1, "??", "??", "??", "??", "??"]], [{"name": "OtherTransactionTotalTime/php__FILE__"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/PHP/Monolog/enabled"}, [1, "??", "??", "??", "??", "??"]], + [{"name": "Supportability/PHP/package/monolog/monolog/2/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/library/Monolog/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/LocalDecorating/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/Forwarding/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], diff --git a/tests/integration/logging/monolog2/test_monolog_context_limits_2.php b/tests/integration/logging/monolog2/test_monolog_context_limits_2.php index 300365203..213b7379a 100644 --- a/tests/integration/logging/monolog2/test_monolog_context_limits_2.php +++ b/tests/integration/logging/monolog2/test_monolog_context_limits_2.php @@ -45,6 +45,7 @@ [{"name": "OtherTransactionTotalTime"}, [1, "??", "??", "??", "??", "??"]], [{"name": "OtherTransactionTotalTime/php__FILE__"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/PHP/Monolog/enabled"}, [1, "??", "??", "??", "??", "??"]], + [{"name": "Supportability/PHP/package/monolog/monolog/2/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/library/Monolog/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/LocalDecorating/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/Forwarding/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], diff --git a/tests/integration/logging/monolog2/test_monolog_context_precedence_1.php b/tests/integration/logging/monolog2/test_monolog_context_precedence_1.php index 94b6b9069..6d571330c 100644 --- a/tests/integration/logging/monolog2/test_monolog_context_precedence_1.php +++ b/tests/integration/logging/monolog2/test_monolog_context_precedence_1.php @@ -48,6 +48,7 @@ [{"name": "OtherTransactionTotalTime"}, [1, "??", "??", "??", "??", "??"]], [{"name": "OtherTransactionTotalTime/php__FILE__"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/PHP/Monolog/enabled"}, [1, "??", "??", "??", "??", "??"]], + [{"name": "Supportability/PHP/package/monolog/monolog/2/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/library/Monolog/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/LocalDecorating/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/Forwarding/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], diff --git a/tests/integration/logging/monolog2/test_monolog_context_precedence_2.php b/tests/integration/logging/monolog2/test_monolog_context_precedence_2.php index 1401e6571..7bf8b13ce 100644 --- a/tests/integration/logging/monolog2/test_monolog_context_precedence_2.php +++ b/tests/integration/logging/monolog2/test_monolog_context_precedence_2.php @@ -48,6 +48,7 @@ [{"name": "OtherTransactionTotalTime"}, [1, "??", "??", "??", "??", "??"]], [{"name": "OtherTransactionTotalTime/php__FILE__"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/PHP/Monolog/enabled"}, [1, "??", "??", "??", "??", "??"]], + [{"name": "Supportability/PHP/package/monolog/monolog/2/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/library/Monolog/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/LocalDecorating/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/Forwarding/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], diff --git a/tests/integration/logging/monolog2/test_monolog_context_simple.php b/tests/integration/logging/monolog2/test_monolog_context_simple.php index f29ab92d8..769694845 100644 --- a/tests/integration/logging/monolog2/test_monolog_context_simple.php +++ b/tests/integration/logging/monolog2/test_monolog_context_simple.php @@ -59,6 +59,7 @@ [{"name": "OtherTransactionTotalTime"}, [1, "??", "??", "??", "??", "??"]], [{"name": "OtherTransactionTotalTime/php__FILE__"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/PHP/Monolog/enabled"}, [1, "??", "??", "??", "??", "??"]], + [{"name": "Supportability/PHP/package/monolog/monolog/2/detected"}, [8, "??", "??", "??", "??", "??"]], [{"name": "Supportability/library/Monolog/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/LocalDecorating/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/Forwarding/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], diff --git a/tests/integration/logging/monolog2/test_monolog_decoration_and_forwarding.php b/tests/integration/logging/monolog2/test_monolog_decoration_and_forwarding.php index 01ce34da8..1737a919c 100644 --- a/tests/integration/logging/monolog2/test_monolog_decoration_and_forwarding.php +++ b/tests/integration/logging/monolog2/test_monolog_decoration_and_forwarding.php @@ -113,6 +113,7 @@ [{"name": "OtherTransactionTotalTime/php__FILE__"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/api/get_linking_metadata"}, [16, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/PHP/Monolog/enabled"}, [1, "??", "??", "??", "??", "??"]], + [{"name": "Supportability/PHP/package/monolog/monolog/2/detected"}, [8, "??", "??", "??", "??", "??"]], [{"name": "Supportability/library/Monolog/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/LocalDecorating/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/Forwarding/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], diff --git a/tests/integration/logging/monolog2/test_monolog_disable_metrics.php b/tests/integration/logging/monolog2/test_monolog_disable_metrics.php index 9f9682652..95b84d636 100644 --- a/tests/integration/logging/monolog2/test_monolog_disable_metrics.php +++ b/tests/integration/logging/monolog2/test_monolog_disable_metrics.php @@ -51,6 +51,7 @@ [{"name": "OtherTransactionTotalTime"}, [1, "??", "??", "??", "??", "??"]], [{"name": "OtherTransactionTotalTime/php__FILE__"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/PHP/Monolog/enabled"}, [1, "??", "??", "??", "??", "??"]], + [{"name": "Supportability/PHP/package/monolog/monolog/2/detected"}, [8, "??", "??", "??", "??", "??"]], [{"name": "Supportability/library/Monolog/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/LocalDecorating/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/Forwarding/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], diff --git a/tests/integration/logging/monolog2/test_monolog_drop_empty.php b/tests/integration/logging/monolog2/test_monolog_drop_empty.php index e9d236e77..8139e3606 100644 --- a/tests/integration/logging/monolog2/test_monolog_drop_empty.php +++ b/tests/integration/logging/monolog2/test_monolog_drop_empty.php @@ -57,6 +57,7 @@ [{"name": "OtherTransactionTotalTime"}, [1, "??", "??", "??", "??", "??"]], [{"name": "OtherTransactionTotalTime/php__FILE__"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/PHP/Monolog/enabled"}, [1, "??", "??", "??", "??", "??"]], + [{"name": "Supportability/PHP/package/monolog/monolog/2/detected"}, [8, "??", "??", "??", "??", "??"]], [{"name": "Supportability/library/Monolog/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/LocalDecorating/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/Forwarding/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], diff --git a/tests/integration/logging/monolog2/test_monolog_escape_chars.php b/tests/integration/logging/monolog2/test_monolog_escape_chars.php index 6018682f0..b95a67b1f 100644 --- a/tests/integration/logging/monolog2/test_monolog_escape_chars.php +++ b/tests/integration/logging/monolog2/test_monolog_escape_chars.php @@ -38,6 +38,7 @@ [{"name": "OtherTransactionTotalTime"}, [1, "??", "??", "??", "??", "??"]], [{"name": "OtherTransactionTotalTime/php__FILE__"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/PHP/Monolog/enabled"}, [1, "??", "??", "??", "??", "??"]], + [{"name": "Supportability/PHP/package/monolog/monolog/2/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/library/Monolog/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/LocalDecorating/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/Forwarding/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], diff --git a/tests/integration/logging/monolog2/test_monolog_large_message_limit.php b/tests/integration/logging/monolog2/test_monolog_large_message_limit.php index a6790497b..d7c9b677a 100644 --- a/tests/integration/logging/monolog2/test_monolog_large_message_limit.php +++ b/tests/integration/logging/monolog2/test_monolog_large_message_limit.php @@ -40,6 +40,7 @@ [{"name": "OtherTransactionTotalTime"}, [1, "??", "??", "??", "??", "??"]], [{"name": "OtherTransactionTotalTime/php__FILE__"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/PHP/Monolog/enabled"}, [1, "??", "??", "??", "??", "??"]], + [{"name": "Supportability/PHP/package/monolog/monolog/2/detected"}, [833, "??", "??", "??", "??", "??"]], [{"name": "Supportability/library/Monolog/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/LocalDecorating/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/Forwarding/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], diff --git a/tests/integration/logging/monolog2/test_monolog_large_message_limit_drops.php b/tests/integration/logging/monolog2/test_monolog_large_message_limit_drops.php index f21657f53..0dfe1dc2d 100644 --- a/tests/integration/logging/monolog2/test_monolog_large_message_limit_drops.php +++ b/tests/integration/logging/monolog2/test_monolog_large_message_limit_drops.php @@ -40,6 +40,7 @@ [{"name": "OtherTransactionTotalTime"}, [1, "??", "??", "??", "??", "??"]], [{"name": "OtherTransactionTotalTime/php__FILE__"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/PHP/Monolog/enabled"}, [1, "??", "??", "??", "??", "??"]], + [{"name": "Supportability/PHP/package/monolog/monolog/2/detected"}, [1666, "??", "??", "??", "??", "??"]], [{"name": "Supportability/library/Monolog/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/LocalDecorating/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/Forwarding/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], diff --git a/tests/integration/logging/monolog2/test_monolog_limit_log_events.php b/tests/integration/logging/monolog2/test_monolog_limit_log_events.php index ea2104892..c9106b2ea 100644 --- a/tests/integration/logging/monolog2/test_monolog_limit_log_events.php +++ b/tests/integration/logging/monolog2/test_monolog_limit_log_events.php @@ -58,6 +58,7 @@ [{"name": "OtherTransactionTotalTime"}, [1, "??", "??", "??", "??", "??"]], [{"name": "OtherTransactionTotalTime/php__FILE__"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/PHP/Monolog/enabled"}, [1, "??", "??", "??", "??", "??"]], + [{"name": "Supportability/PHP/package/monolog/monolog/2/detected"}, [8, "??", "??", "??", "??", "??"]], [{"name": "Supportability/library/Monolog/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/LocalDecorating/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/Forwarding/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], diff --git a/tests/integration/logging/monolog2/test_monolog_limit_zero_events.php b/tests/integration/logging/monolog2/test_monolog_limit_zero_events.php index 0aa718275..6ff0fa7d1 100644 --- a/tests/integration/logging/monolog2/test_monolog_limit_zero_events.php +++ b/tests/integration/logging/monolog2/test_monolog_limit_zero_events.php @@ -58,6 +58,7 @@ [{"name": "OtherTransactionTotalTime"}, [1, "??", "??", "??", "??", "??"]], [{"name": "OtherTransactionTotalTime/php__FILE__"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/PHP/Monolog/enabled"}, [1, "??", "??", "??", "??", "??"]], + [{"name": "Supportability/PHP/package/monolog/monolog/2/detected"}, [8, "??", "??", "??", "??", "??"]], [{"name": "Supportability/library/Monolog/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/LocalDecorating/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/Forwarding/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], diff --git a/tests/integration/logging/monolog2/test_monolog_log_events_max_samples_stored_invalid1.php b/tests/integration/logging/monolog2/test_monolog_log_events_max_samples_stored_invalid1.php index 28a670681..f760b19ac 100644 --- a/tests/integration/logging/monolog2/test_monolog_log_events_max_samples_stored_invalid1.php +++ b/tests/integration/logging/monolog2/test_monolog_log_events_max_samples_stored_invalid1.php @@ -45,6 +45,7 @@ [{"name": "Supportability/Logging/Forwarding/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/Metrics/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/PHP/Monolog/enabled"}, [1, "??", "??", "??", "??", "??"]], + [{"name": "Supportability/PHP/package/monolog/monolog/2/detected"}, [833, "??", "??", "??", "??", "??"]], [{"name": "Supportability/library/Monolog/detected"}, [1, "??", "??", "??", "??", "??"]] ] ] diff --git a/tests/integration/logging/monolog2/test_monolog_log_events_max_samples_stored_invalid2.php b/tests/integration/logging/monolog2/test_monolog_log_events_max_samples_stored_invalid2.php index 0999ba3b0..ada730ed7 100644 --- a/tests/integration/logging/monolog2/test_monolog_log_events_max_samples_stored_invalid2.php +++ b/tests/integration/logging/monolog2/test_monolog_log_events_max_samples_stored_invalid2.php @@ -45,6 +45,7 @@ [{"name": "Supportability/Logging/Forwarding/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/Metrics/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/PHP/Monolog/enabled"}, [1, "??", "??", "??", "??", "??"]], + [{"name": "Supportability/PHP/package/monolog/monolog/2/detected"}, [833, "??", "??", "??", "??", "??"]], [{"name": "Supportability/library/Monolog/detected"}, [1, "??", "??", "??", "??", "??"]] ] ] diff --git a/tests/integration/logging/monolog2/test_monolog_log_events_max_samples_stored_invalid3.php b/tests/integration/logging/monolog2/test_monolog_log_events_max_samples_stored_invalid3.php index afb9e5bbb..cdd99bc5f 100644 --- a/tests/integration/logging/monolog2/test_monolog_log_events_max_samples_stored_invalid3.php +++ b/tests/integration/logging/monolog2/test_monolog_log_events_max_samples_stored_invalid3.php @@ -45,6 +45,7 @@ [{"name": "Supportability/Logging/Forwarding/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/Metrics/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/PHP/Monolog/enabled"}, [1, "??", "??", "??", "??", "??"]], + [{"name": "Supportability/PHP/package/monolog/monolog/2/detected"}, [833, "??", "??", "??", "??", "??"]], [{"name": "Supportability/library/Monolog/detected"}, [1, "??", "??", "??", "??", "??"]] ] ] diff --git a/tests/integration/logging/monolog2/test_monolog_log_events_max_samples_stored_invalid4.php b/tests/integration/logging/monolog2/test_monolog_log_events_max_samples_stored_invalid4.php index 8696024df..354108a09 100644 --- a/tests/integration/logging/monolog2/test_monolog_log_events_max_samples_stored_invalid4.php +++ b/tests/integration/logging/monolog2/test_monolog_log_events_max_samples_stored_invalid4.php @@ -45,6 +45,7 @@ [{"name": "Supportability/Logging/Forwarding/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/Metrics/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/PHP/Monolog/enabled"}, [1, "??", "??", "??", "??", "??"]], + [{"name": "Supportability/PHP/package/monolog/monolog/2/detected"}, [833, "??", "??", "??", "??", "??"]], [{"name": "Supportability/library/Monolog/detected"}, [1, "??", "??", "??", "??", "??"]] ] ] diff --git a/tests/integration/logging/monolog2/test_monolog_log_level_filter.php b/tests/integration/logging/monolog2/test_monolog_log_level_filter.php index f24a2a62f..939dd9cf5 100644 --- a/tests/integration/logging/monolog2/test_monolog_log_level_filter.php +++ b/tests/integration/logging/monolog2/test_monolog_log_level_filter.php @@ -60,6 +60,7 @@ [{"name": "Supportability/Logging/Forwarding/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/Metrics/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/PHP/Monolog/enabled"}, [1, "??", "??", "??", "??", "??"]], + [{"name": "Supportability/PHP/package/monolog/monolog/2/detected"}, [8, "??", "??", "??", "??", "??"]], [{"name": "Supportability/library/Monolog/detected"}, [1, "??", "??", "??", "??", "??"]] ] ] diff --git a/tests/integration/logging/monolog2/test_monolog_log_level_filter_invalid.php b/tests/integration/logging/monolog2/test_monolog_log_level_filter_invalid.php index 6259670f0..d2eac9410 100644 --- a/tests/integration/logging/monolog2/test_monolog_log_level_filter_invalid.php +++ b/tests/integration/logging/monolog2/test_monolog_log_level_filter_invalid.php @@ -61,6 +61,7 @@ [{"name": "Supportability/Logging/Forwarding/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/Metrics/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/PHP/Monolog/enabled"}, [1, "??", "??", "??", "??", "??"]], + [{"name": "Supportability/PHP/package/monolog/monolog/2/detected"}, [8, "??", "??", "??", "??", "??"]], [{"name": "Supportability/library/Monolog/detected"}, [1, "??", "??", "??", "??", "??"]] ] ] diff --git a/tests/integration/logging/monolog2/test_monolog_truncate_long_msgs.php b/tests/integration/logging/monolog2/test_monolog_truncate_long_msgs.php index db912a727..4b8303eb1 100644 --- a/tests/integration/logging/monolog2/test_monolog_truncate_long_msgs.php +++ b/tests/integration/logging/monolog2/test_monolog_truncate_long_msgs.php @@ -43,6 +43,7 @@ [{"name": "OtherTransactionTotalTime"}, [1, "??", "??", "??", "??", "??"]], [{"name": "OtherTransactionTotalTime/php__FILE__"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/PHP/Monolog/enabled"}, [1, "??", "??", "??", "??", "??"]], + [{"name": "Supportability/PHP/package/monolog/monolog/2/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/library/Monolog/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/LocalDecorating/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/Forwarding/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], diff --git a/tests/integration/logging/monolog3/test_monolog_basic.php b/tests/integration/logging/monolog3/test_monolog_basic.php index 538d5c9c9..5cbc3a1da 100644 --- a/tests/integration/logging/monolog3/test_monolog_basic.php +++ b/tests/integration/logging/monolog3/test_monolog_basic.php @@ -56,6 +56,7 @@ [{"name": "OtherTransactionTotalTime"}, [1, "??", "??", "??", "??", "??"]], [{"name": "OtherTransactionTotalTime/php__FILE__"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/PHP/Monolog/enabled"}, [1, "??", "??", "??", "??", "??"]], + [{"name": "Supportability/PHP/package/monolog/monolog/3/detected"}, [8, "??", "??", "??", "??", "??"]], [{"name": "Supportability/library/Monolog/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/LocalDecorating/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/Forwarding/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], diff --git a/tests/integration/logging/monolog3/test_monolog_basic_clm.php b/tests/integration/logging/monolog3/test_monolog_basic_clm.php index 675f292bb..8fe6f3613 100644 --- a/tests/integration/logging/monolog3/test_monolog_basic_clm.php +++ b/tests/integration/logging/monolog3/test_monolog_basic_clm.php @@ -44,6 +44,7 @@ [{"name": "OtherTransaction/php__FILE__"}, [1, "??", "??", "??", "??", "??"]], [{"name": "OtherTransactionTotalTime"}, [1, "??", "??", "??", "??", "??"]], [{"name": "OtherTransactionTotalTime/php__FILE__"}, [1, "??", "??", "??", "??", "??"]], + [{"name": "Supportability/PHP/package/monolog/monolog/3/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/PHP/Monolog/enabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/library/Monolog/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/LocalDecorating/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]], diff --git a/tests/integration/logging/monolog3/test_monolog_basic_clm_off.php b/tests/integration/logging/monolog3/test_monolog_basic_clm_off.php index 2ca2e988c..e4ed19192 100644 --- a/tests/integration/logging/monolog3/test_monolog_basic_clm_off.php +++ b/tests/integration/logging/monolog3/test_monolog_basic_clm_off.php @@ -44,6 +44,7 @@ [{"name": "OtherTransactionTotalTime"}, [1, "??", "??", "??", "??", "??"]], [{"name": "OtherTransactionTotalTime/php__FILE__"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/PHP/Monolog/enabled"}, [1, "??", "??", "??", "??", "??"]], + [{"name": "Supportability/PHP/package/monolog/monolog/3/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/library/Monolog/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/LocalDecorating/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/Forwarding/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], diff --git a/tests/integration/logging/monolog3/test_monolog_cat.php b/tests/integration/logging/monolog3/test_monolog_cat.php index 1c68774d4..dcf557213 100644 --- a/tests/integration/logging/monolog3/test_monolog_cat.php +++ b/tests/integration/logging/monolog3/test_monolog_cat.php @@ -56,6 +56,7 @@ [{"name": "OtherTransactionTotalTime"}, [1, "??", "??", "??", "??", "??"]], [{"name": "OtherTransactionTotalTime/php__FILE__"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/PHP/Monolog/enabled"}, [1, "??", "??", "??", "??", "??"]], + [{"name": "Supportability/PHP/package/monolog/monolog/3/detected"}, [8, "??", "??", "??", "??", "??"]], [{"name": "Supportability/library/Monolog/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/LocalDecorating/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/Forwarding/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], diff --git a/tests/integration/logging/monolog3/test_monolog_context_default.php b/tests/integration/logging/monolog3/test_monolog_context_default.php index f5dde42ad..9080370e6 100644 --- a/tests/integration/logging/monolog3/test_monolog_context_default.php +++ b/tests/integration/logging/monolog3/test_monolog_context_default.php @@ -44,6 +44,7 @@ [{"name": "OtherTransactionTotalTime"}, [1, "??", "??", "??", "??", "??"]], [{"name": "OtherTransactionTotalTime/php__FILE__"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/PHP/Monolog/enabled"}, [1, "??", "??", "??", "??", "??"]], + [{"name": "Supportability/PHP/package/monolog/monolog/3/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/library/Monolog/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/LocalDecorating/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/Forwarding/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], diff --git a/tests/integration/logging/monolog3/test_monolog_context_exception.php b/tests/integration/logging/monolog3/test_monolog_context_exception.php index 900b614cc..f64a6fc29 100644 --- a/tests/integration/logging/monolog3/test_monolog_context_exception.php +++ b/tests/integration/logging/monolog3/test_monolog_context_exception.php @@ -46,6 +46,7 @@ [{"name": "OtherTransactionTotalTime"}, [1, "??", "??", "??", "??", "??"]], [{"name": "OtherTransactionTotalTime/php__FILE__"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/PHP/Monolog/enabled"}, [1, "??", "??", "??", "??", "??"]], + [{"name": "Supportability/PHP/package/monolog/monolog/3/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/library/Monolog/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/LocalDecorating/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/Forwarding/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], diff --git a/tests/integration/logging/monolog3/test_monolog_context_filter_extra1.php b/tests/integration/logging/monolog3/test_monolog_context_filter_extra1.php index 443dc5248..7eed2a0b7 100644 --- a/tests/integration/logging/monolog3/test_monolog_context_filter_extra1.php +++ b/tests/integration/logging/monolog3/test_monolog_context_filter_extra1.php @@ -51,6 +51,7 @@ [{"name": "OtherTransactionTotalTime"}, [1, "??", "??", "??", "??", "??"]], [{"name": "OtherTransactionTotalTime/php__FILE__"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/PHP/Monolog/enabled"}, [1, "??", "??", "??", "??", "??"]], + [{"name": "Supportability/PHP/package/monolog/monolog/3/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/library/Monolog/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/LocalDecorating/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/Forwarding/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], diff --git a/tests/integration/logging/monolog3/test_monolog_context_filter_extra2.php b/tests/integration/logging/monolog3/test_monolog_context_filter_extra2.php index ce5d41251..7949d2f62 100644 --- a/tests/integration/logging/monolog3/test_monolog_context_filter_extra2.php +++ b/tests/integration/logging/monolog3/test_monolog_context_filter_extra2.php @@ -51,6 +51,7 @@ [{"name": "OtherTransactionTotalTime"}, [1, "??", "??", "??", "??", "??"]], [{"name": "OtherTransactionTotalTime/php__FILE__"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/PHP/Monolog/enabled"}, [1, "??", "??", "??", "??", "??"]], + [{"name": "Supportability/PHP/package/monolog/monolog/3/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/library/Monolog/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/LocalDecorating/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/Forwarding/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], diff --git a/tests/integration/logging/monolog3/test_monolog_context_filter_extra3.php b/tests/integration/logging/monolog3/test_monolog_context_filter_extra3.php index 3abd81c6a..c55dda857 100644 --- a/tests/integration/logging/monolog3/test_monolog_context_filter_extra3.php +++ b/tests/integration/logging/monolog3/test_monolog_context_filter_extra3.php @@ -51,6 +51,7 @@ [{"name": "OtherTransactionTotalTime"}, [1, "??", "??", "??", "??", "??"]], [{"name": "OtherTransactionTotalTime/php__FILE__"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/PHP/Monolog/enabled"}, [1, "??", "??", "??", "??", "??"]], + [{"name": "Supportability/PHP/package/monolog/monolog/3/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/library/Monolog/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/LocalDecorating/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/Forwarding/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], diff --git a/tests/integration/logging/monolog3/test_monolog_context_filter_extra4.php b/tests/integration/logging/monolog3/test_monolog_context_filter_extra4.php index 2d7dcac60..842d5f85b 100644 --- a/tests/integration/logging/monolog3/test_monolog_context_filter_extra4.php +++ b/tests/integration/logging/monolog3/test_monolog_context_filter_extra4.php @@ -51,6 +51,7 @@ [{"name": "OtherTransactionTotalTime"}, [1, "??", "??", "??", "??", "??"]], [{"name": "OtherTransactionTotalTime/php__FILE__"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/PHP/Monolog/enabled"}, [1, "??", "??", "??", "??", "??"]], + [{"name": "Supportability/PHP/package/monolog/monolog/3/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/library/Monolog/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/LocalDecorating/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/Forwarding/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], diff --git a/tests/integration/logging/monolog3/test_monolog_context_filter_extra5.php b/tests/integration/logging/monolog3/test_monolog_context_filter_extra5.php index 0496fa444..8eff9169e 100644 --- a/tests/integration/logging/monolog3/test_monolog_context_filter_extra5.php +++ b/tests/integration/logging/monolog3/test_monolog_context_filter_extra5.php @@ -51,6 +51,7 @@ [{"name": "OtherTransactionTotalTime"}, [1, "??", "??", "??", "??", "??"]], [{"name": "OtherTransactionTotalTime/php__FILE__"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/PHP/Monolog/enabled"}, [1, "??", "??", "??", "??", "??"]], + [{"name": "Supportability/PHP/package/monolog/monolog/3/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/library/Monolog/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/LocalDecorating/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/Forwarding/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], diff --git a/tests/integration/logging/monolog3/test_monolog_context_filter_rule1.php b/tests/integration/logging/monolog3/test_monolog_context_filter_rule1.php index 27297c832..f21b520c4 100644 --- a/tests/integration/logging/monolog3/test_monolog_context_filter_rule1.php +++ b/tests/integration/logging/monolog3/test_monolog_context_filter_rule1.php @@ -51,6 +51,7 @@ [{"name": "OtherTransactionTotalTime"}, [1, "??", "??", "??", "??", "??"]], [{"name": "OtherTransactionTotalTime/php__FILE__"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/PHP/Monolog/enabled"}, [1, "??", "??", "??", "??", "??"]], + [{"name": "Supportability/PHP/package/monolog/monolog/3/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/library/Monolog/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/LocalDecorating/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/Forwarding/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], diff --git a/tests/integration/logging/monolog3/test_monolog_context_filter_rule10.php b/tests/integration/logging/monolog3/test_monolog_context_filter_rule10.php index 6c5a0c94b..528764c59 100644 --- a/tests/integration/logging/monolog3/test_monolog_context_filter_rule10.php +++ b/tests/integration/logging/monolog3/test_monolog_context_filter_rule10.php @@ -51,6 +51,7 @@ [{"name": "OtherTransactionTotalTime"}, [1, "??", "??", "??", "??", "??"]], [{"name": "OtherTransactionTotalTime/php__FILE__"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/PHP/Monolog/enabled"}, [1, "??", "??", "??", "??", "??"]], + [{"name": "Supportability/PHP/package/monolog/monolog/3/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/library/Monolog/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/LocalDecorating/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/Forwarding/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], diff --git a/tests/integration/logging/monolog3/test_monolog_context_filter_rule11.php b/tests/integration/logging/monolog3/test_monolog_context_filter_rule11.php index eb3b8f4ad..ea0cedc02 100644 --- a/tests/integration/logging/monolog3/test_monolog_context_filter_rule11.php +++ b/tests/integration/logging/monolog3/test_monolog_context_filter_rule11.php @@ -51,6 +51,7 @@ [{"name": "OtherTransactionTotalTime"}, [1, "??", "??", "??", "??", "??"]], [{"name": "OtherTransactionTotalTime/php__FILE__"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/PHP/Monolog/enabled"}, [1, "??", "??", "??", "??", "??"]], + [{"name": "Supportability/PHP/package/monolog/monolog/3/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/library/Monolog/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/LocalDecorating/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/Forwarding/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], diff --git a/tests/integration/logging/monolog3/test_monolog_context_filter_rule2.php b/tests/integration/logging/monolog3/test_monolog_context_filter_rule2.php index 648d24aa3..febcd5f39 100644 --- a/tests/integration/logging/monolog3/test_monolog_context_filter_rule2.php +++ b/tests/integration/logging/monolog3/test_monolog_context_filter_rule2.php @@ -51,6 +51,7 @@ [{"name": "OtherTransactionTotalTime"}, [1, "??", "??", "??", "??", "??"]], [{"name": "OtherTransactionTotalTime/php__FILE__"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/PHP/Monolog/enabled"}, [1, "??", "??", "??", "??", "??"]], + [{"name": "Supportability/PHP/package/monolog/monolog/3/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/library/Monolog/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/LocalDecorating/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/Forwarding/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], diff --git a/tests/integration/logging/monolog3/test_monolog_context_filter_rule3.php b/tests/integration/logging/monolog3/test_monolog_context_filter_rule3.php index 3b3954a17..602226e89 100644 --- a/tests/integration/logging/monolog3/test_monolog_context_filter_rule3.php +++ b/tests/integration/logging/monolog3/test_monolog_context_filter_rule3.php @@ -51,6 +51,7 @@ [{"name": "OtherTransactionTotalTime"}, [1, "??", "??", "??", "??", "??"]], [{"name": "OtherTransactionTotalTime/php__FILE__"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/PHP/Monolog/enabled"}, [1, "??", "??", "??", "??", "??"]], + [{"name": "Supportability/PHP/package/monolog/monolog/3/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/library/Monolog/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/LocalDecorating/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/Forwarding/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], diff --git a/tests/integration/logging/monolog3/test_monolog_context_filter_rule4.php b/tests/integration/logging/monolog3/test_monolog_context_filter_rule4.php index 6e07994f6..ba03f7696 100644 --- a/tests/integration/logging/monolog3/test_monolog_context_filter_rule4.php +++ b/tests/integration/logging/monolog3/test_monolog_context_filter_rule4.php @@ -51,6 +51,7 @@ [{"name": "OtherTransactionTotalTime"}, [1, "??", "??", "??", "??", "??"]], [{"name": "OtherTransactionTotalTime/php__FILE__"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/PHP/Monolog/enabled"}, [1, "??", "??", "??", "??", "??"]], + [{"name": "Supportability/PHP/package/monolog/monolog/3/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/library/Monolog/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/LocalDecorating/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/Forwarding/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], diff --git a/tests/integration/logging/monolog3/test_monolog_context_filter_rule5.php b/tests/integration/logging/monolog3/test_monolog_context_filter_rule5.php index 446120f46..ad9337295 100644 --- a/tests/integration/logging/monolog3/test_monolog_context_filter_rule5.php +++ b/tests/integration/logging/monolog3/test_monolog_context_filter_rule5.php @@ -51,6 +51,7 @@ [{"name": "OtherTransactionTotalTime"}, [1, "??", "??", "??", "??", "??"]], [{"name": "OtherTransactionTotalTime/php__FILE__"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/PHP/Monolog/enabled"}, [1, "??", "??", "??", "??", "??"]], + [{"name": "Supportability/PHP/package/monolog/monolog/3/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/library/Monolog/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/LocalDecorating/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/Forwarding/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], diff --git a/tests/integration/logging/monolog3/test_monolog_context_filter_rule6.php b/tests/integration/logging/monolog3/test_monolog_context_filter_rule6.php index 5544883ff..60bd29813 100644 --- a/tests/integration/logging/monolog3/test_monolog_context_filter_rule6.php +++ b/tests/integration/logging/monolog3/test_monolog_context_filter_rule6.php @@ -51,6 +51,7 @@ [{"name": "OtherTransactionTotalTime"}, [1, "??", "??", "??", "??", "??"]], [{"name": "OtherTransactionTotalTime/php__FILE__"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/PHP/Monolog/enabled"}, [1, "??", "??", "??", "??", "??"]], + [{"name": "Supportability/PHP/package/monolog/monolog/3/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/library/Monolog/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/LocalDecorating/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/Forwarding/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], diff --git a/tests/integration/logging/monolog3/test_monolog_context_filter_rule7.php b/tests/integration/logging/monolog3/test_monolog_context_filter_rule7.php index d4c4f85a6..95f97c449 100644 --- a/tests/integration/logging/monolog3/test_monolog_context_filter_rule7.php +++ b/tests/integration/logging/monolog3/test_monolog_context_filter_rule7.php @@ -51,6 +51,7 @@ [{"name": "OtherTransactionTotalTime"}, [1, "??", "??", "??", "??", "??"]], [{"name": "OtherTransactionTotalTime/php__FILE__"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/PHP/Monolog/enabled"}, [1, "??", "??", "??", "??", "??"]], + [{"name": "Supportability/PHP/package/monolog/monolog/3/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/library/Monolog/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/LocalDecorating/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/Forwarding/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], diff --git a/tests/integration/logging/monolog3/test_monolog_context_filter_rule8.php b/tests/integration/logging/monolog3/test_monolog_context_filter_rule8.php index abf12928f..527c79a7e 100644 --- a/tests/integration/logging/monolog3/test_monolog_context_filter_rule8.php +++ b/tests/integration/logging/monolog3/test_monolog_context_filter_rule8.php @@ -51,6 +51,7 @@ [{"name": "OtherTransactionTotalTime"}, [1, "??", "??", "??", "??", "??"]], [{"name": "OtherTransactionTotalTime/php__FILE__"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/PHP/Monolog/enabled"}, [1, "??", "??", "??", "??", "??"]], + [{"name": "Supportability/PHP/package/monolog/monolog/3/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/library/Monolog/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/LocalDecorating/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/Forwarding/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], diff --git a/tests/integration/logging/monolog3/test_monolog_context_filter_rule9.php b/tests/integration/logging/monolog3/test_monolog_context_filter_rule9.php index 61c8f1a0c..98fc8b5e2 100644 --- a/tests/integration/logging/monolog3/test_monolog_context_filter_rule9.php +++ b/tests/integration/logging/monolog3/test_monolog_context_filter_rule9.php @@ -51,6 +51,7 @@ [{"name": "OtherTransactionTotalTime"}, [1, "??", "??", "??", "??", "??"]], [{"name": "OtherTransactionTotalTime/php__FILE__"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/PHP/Monolog/enabled"}, [1, "??", "??", "??", "??", "??"]], + [{"name": "Supportability/PHP/package/monolog/monolog/3/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/library/Monolog/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/LocalDecorating/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/Forwarding/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], diff --git a/tests/integration/logging/monolog3/test_monolog_context_limits_1.php b/tests/integration/logging/monolog3/test_monolog_context_limits_1.php index 0eb98376f..9d5836311 100644 --- a/tests/integration/logging/monolog3/test_monolog_context_limits_1.php +++ b/tests/integration/logging/monolog3/test_monolog_context_limits_1.php @@ -45,6 +45,7 @@ [{"name": "OtherTransactionTotalTime"}, [1, "??", "??", "??", "??", "??"]], [{"name": "OtherTransactionTotalTime/php__FILE__"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/PHP/Monolog/enabled"}, [1, "??", "??", "??", "??", "??"]], + [{"name": "Supportability/PHP/package/monolog/monolog/3/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/library/Monolog/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/LocalDecorating/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/Forwarding/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], diff --git a/tests/integration/logging/monolog3/test_monolog_context_limits_2.php b/tests/integration/logging/monolog3/test_monolog_context_limits_2.php index 6efed9ff5..6925fc905 100644 --- a/tests/integration/logging/monolog3/test_monolog_context_limits_2.php +++ b/tests/integration/logging/monolog3/test_monolog_context_limits_2.php @@ -45,6 +45,7 @@ [{"name": "OtherTransactionTotalTime"}, [1, "??", "??", "??", "??", "??"]], [{"name": "OtherTransactionTotalTime/php__FILE__"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/PHP/Monolog/enabled"}, [1, "??", "??", "??", "??", "??"]], + [{"name": "Supportability/PHP/package/monolog/monolog/3/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/library/Monolog/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/LocalDecorating/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/Forwarding/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], diff --git a/tests/integration/logging/monolog3/test_monolog_context_precedence_1.php b/tests/integration/logging/monolog3/test_monolog_context_precedence_1.php index 6c66317b6..301164d11 100644 --- a/tests/integration/logging/monolog3/test_monolog_context_precedence_1.php +++ b/tests/integration/logging/monolog3/test_monolog_context_precedence_1.php @@ -48,6 +48,7 @@ [{"name": "OtherTransactionTotalTime"}, [1, "??", "??", "??", "??", "??"]], [{"name": "OtherTransactionTotalTime/php__FILE__"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/PHP/Monolog/enabled"}, [1, "??", "??", "??", "??", "??"]], + [{"name": "Supportability/PHP/package/monolog/monolog/3/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/library/Monolog/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/LocalDecorating/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/Forwarding/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], diff --git a/tests/integration/logging/monolog3/test_monolog_context_precedence_2.php b/tests/integration/logging/monolog3/test_monolog_context_precedence_2.php index 451e5f49b..b05977c22 100644 --- a/tests/integration/logging/monolog3/test_monolog_context_precedence_2.php +++ b/tests/integration/logging/monolog3/test_monolog_context_precedence_2.php @@ -48,6 +48,7 @@ [{"name": "OtherTransactionTotalTime"}, [1, "??", "??", "??", "??", "??"]], [{"name": "OtherTransactionTotalTime/php__FILE__"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/PHP/Monolog/enabled"}, [1, "??", "??", "??", "??", "??"]], + [{"name": "Supportability/PHP/package/monolog/monolog/3/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/library/Monolog/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/LocalDecorating/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/Forwarding/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], diff --git a/tests/integration/logging/monolog3/test_monolog_context_simple.php b/tests/integration/logging/monolog3/test_monolog_context_simple.php index 3c6fd51ef..1e77e6d25 100644 --- a/tests/integration/logging/monolog3/test_monolog_context_simple.php +++ b/tests/integration/logging/monolog3/test_monolog_context_simple.php @@ -59,6 +59,7 @@ [{"name": "OtherTransactionTotalTime"}, [1, "??", "??", "??", "??", "??"]], [{"name": "OtherTransactionTotalTime/php__FILE__"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/PHP/Monolog/enabled"}, [1, "??", "??", "??", "??", "??"]], + [{"name": "Supportability/PHP/package/monolog/monolog/3/detected"}, [8, "??", "??", "??", "??", "??"]], [{"name": "Supportability/library/Monolog/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/LocalDecorating/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/Forwarding/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], diff --git a/tests/integration/logging/monolog3/test_monolog_decoration_and_forwarding.php b/tests/integration/logging/monolog3/test_monolog_decoration_and_forwarding.php index 20b201daa..fa0bbb6cb 100644 --- a/tests/integration/logging/monolog3/test_monolog_decoration_and_forwarding.php +++ b/tests/integration/logging/monolog3/test_monolog_decoration_and_forwarding.php @@ -113,6 +113,7 @@ [{"name": "OtherTransactionTotalTime/php__FILE__"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/api/get_linking_metadata"}, [16, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/PHP/Monolog/enabled"}, [1, "??", "??", "??", "??", "??"]], + [{"name": "Supportability/PHP/package/monolog/monolog/3/detected"}, [8, "??", "??", "??", "??", "??"]], [{"name": "Supportability/library/Monolog/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/LocalDecorating/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/Forwarding/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], diff --git a/tests/integration/logging/monolog3/test_monolog_disable_metrics.php b/tests/integration/logging/monolog3/test_monolog_disable_metrics.php index 90e6767fb..cb5beb8e1 100644 --- a/tests/integration/logging/monolog3/test_monolog_disable_metrics.php +++ b/tests/integration/logging/monolog3/test_monolog_disable_metrics.php @@ -51,6 +51,7 @@ [{"name": "OtherTransactionTotalTime"}, [1, "??", "??", "??", "??", "??"]], [{"name": "OtherTransactionTotalTime/php__FILE__"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/PHP/Monolog/enabled"}, [1, "??", "??", "??", "??", "??"]], + [{"name": "Supportability/PHP/package/monolog/monolog/3/detected"}, [8, "??", "??", "??", "??", "??"]], [{"name": "Supportability/library/Monolog/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/LocalDecorating/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/Forwarding/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], diff --git a/tests/integration/logging/monolog3/test_monolog_drop_empty.php b/tests/integration/logging/monolog3/test_monolog_drop_empty.php index 4cee51f79..61937fb9f 100644 --- a/tests/integration/logging/monolog3/test_monolog_drop_empty.php +++ b/tests/integration/logging/monolog3/test_monolog_drop_empty.php @@ -57,6 +57,7 @@ [{"name": "OtherTransactionTotalTime"}, [1, "??", "??", "??", "??", "??"]], [{"name": "OtherTransactionTotalTime/php__FILE__"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/PHP/Monolog/enabled"}, [1, "??", "??", "??", "??", "??"]], + [{"name": "Supportability/PHP/package/monolog/monolog/3/detected"}, [8, "??", "??", "??", "??", "??"]], [{"name": "Supportability/library/Monolog/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/LocalDecorating/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/Forwarding/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], diff --git a/tests/integration/logging/monolog3/test_monolog_escape_chars.php b/tests/integration/logging/monolog3/test_monolog_escape_chars.php index c7978a7a2..a1c768efd 100644 --- a/tests/integration/logging/monolog3/test_monolog_escape_chars.php +++ b/tests/integration/logging/monolog3/test_monolog_escape_chars.php @@ -38,6 +38,7 @@ [{"name": "OtherTransactionTotalTime"}, [1, "??", "??", "??", "??", "??"]], [{"name": "OtherTransactionTotalTime/php__FILE__"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/PHP/Monolog/enabled"}, [1, "??", "??", "??", "??", "??"]], + [{"name": "Supportability/PHP/package/monolog/monolog/3/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/library/Monolog/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/LocalDecorating/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/Forwarding/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], diff --git a/tests/integration/logging/monolog3/test_monolog_large_message_limit.php b/tests/integration/logging/monolog3/test_monolog_large_message_limit.php index 1e25b451f..191800f49 100644 --- a/tests/integration/logging/monolog3/test_monolog_large_message_limit.php +++ b/tests/integration/logging/monolog3/test_monolog_large_message_limit.php @@ -40,6 +40,7 @@ [{"name": "OtherTransactionTotalTime"}, [1, "??", "??", "??", "??", "??"]], [{"name": "OtherTransactionTotalTime/php__FILE__"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/PHP/Monolog/enabled"}, [1, "??", "??", "??", "??", "??"]], + [{"name": "Supportability/PHP/package/monolog/monolog/3/detected"}, [833, "??", "??", "??", "??", "??"]], [{"name": "Supportability/library/Monolog/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/LocalDecorating/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/Forwarding/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], diff --git a/tests/integration/logging/monolog3/test_monolog_large_message_limit_drops.php b/tests/integration/logging/monolog3/test_monolog_large_message_limit_drops.php index 66de51989..eed9a410a 100644 --- a/tests/integration/logging/monolog3/test_monolog_large_message_limit_drops.php +++ b/tests/integration/logging/monolog3/test_monolog_large_message_limit_drops.php @@ -40,6 +40,7 @@ [{"name": "OtherTransactionTotalTime"}, [1, "??", "??", "??", "??", "??"]], [{"name": "OtherTransactionTotalTime/php__FILE__"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/PHP/Monolog/enabled"}, [1, "??", "??", "??", "??", "??"]], + [{"name": "Supportability/PHP/package/monolog/monolog/3/detected"}, [1666, "??", "??", "??", "??", "??"]], [{"name": "Supportability/library/Monolog/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/LocalDecorating/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/Forwarding/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], diff --git a/tests/integration/logging/monolog3/test_monolog_limit_log_events.php b/tests/integration/logging/monolog3/test_monolog_limit_log_events.php index 69bdb618c..b1f72e6b6 100644 --- a/tests/integration/logging/monolog3/test_monolog_limit_log_events.php +++ b/tests/integration/logging/monolog3/test_monolog_limit_log_events.php @@ -58,6 +58,7 @@ [{"name": "OtherTransactionTotalTime"}, [1, "??", "??", "??", "??", "??"]], [{"name": "OtherTransactionTotalTime/php__FILE__"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/PHP/Monolog/enabled"}, [1, "??", "??", "??", "??", "??"]], + [{"name": "Supportability/PHP/package/monolog/monolog/3/detected"}, [8, "??", "??", "??", "??", "??"]], [{"name": "Supportability/library/Monolog/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/LocalDecorating/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/Forwarding/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], diff --git a/tests/integration/logging/monolog3/test_monolog_limit_zero_events.php b/tests/integration/logging/monolog3/test_monolog_limit_zero_events.php index a9dd71587..38abfe890 100644 --- a/tests/integration/logging/monolog3/test_monolog_limit_zero_events.php +++ b/tests/integration/logging/monolog3/test_monolog_limit_zero_events.php @@ -58,6 +58,7 @@ [{"name": "OtherTransactionTotalTime"}, [1, "??", "??", "??", "??", "??"]], [{"name": "OtherTransactionTotalTime/php__FILE__"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/PHP/Monolog/enabled"}, [1, "??", "??", "??", "??", "??"]], + [{"name": "Supportability/PHP/package/monolog/monolog/3/detected"}, [8, "??", "??", "??", "??", "??"]], [{"name": "Supportability/library/Monolog/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/LocalDecorating/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/Forwarding/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], diff --git a/tests/integration/logging/monolog3/test_monolog_log_events_max_samples_stored_invalid1.php b/tests/integration/logging/monolog3/test_monolog_log_events_max_samples_stored_invalid1.php index 7b5892cc0..f33d832af 100644 --- a/tests/integration/logging/monolog3/test_monolog_log_events_max_samples_stored_invalid1.php +++ b/tests/integration/logging/monolog3/test_monolog_log_events_max_samples_stored_invalid1.php @@ -45,6 +45,7 @@ [{"name": "Supportability/Logging/Metrics/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/LocalDecorating/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/PHP/Monolog/enabled"}, [1, "??", "??", "??", "??", "??"]], + [{"name": "Supportability/PHP/package/monolog/monolog/3/detected"}, [833, "??", "??", "??", "??", "??"]], [{"name": "Supportability/library/Monolog/detected"}, [1, "??", "??", "??", "??", "??"]] ] ] diff --git a/tests/integration/logging/monolog3/test_monolog_log_events_max_samples_stored_invalid2.php b/tests/integration/logging/monolog3/test_monolog_log_events_max_samples_stored_invalid2.php index 644512bc2..73c70e58e 100644 --- a/tests/integration/logging/monolog3/test_monolog_log_events_max_samples_stored_invalid2.php +++ b/tests/integration/logging/monolog3/test_monolog_log_events_max_samples_stored_invalid2.php @@ -45,6 +45,7 @@ [{"name": "Supportability/Logging/Forwarding/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/Metrics/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/PHP/Monolog/enabled"}, [1, "??", "??", "??", "??", "??"]], + [{"name": "Supportability/PHP/package/monolog/monolog/3/detected"}, [833, "??", "??", "??", "??", "??"]], [{"name": "Supportability/library/Monolog/detected"}, [1, "??", "??", "??", "??", "??"]] ] ] diff --git a/tests/integration/logging/monolog3/test_monolog_log_events_max_samples_stored_invalid3.php b/tests/integration/logging/monolog3/test_monolog_log_events_max_samples_stored_invalid3.php index d64021bad..72ca4b06b 100644 --- a/tests/integration/logging/monolog3/test_monolog_log_events_max_samples_stored_invalid3.php +++ b/tests/integration/logging/monolog3/test_monolog_log_events_max_samples_stored_invalid3.php @@ -45,6 +45,7 @@ [{"name": "Supportability/Logging/Forwarding/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/Metrics/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/PHP/Monolog/enabled"}, [1, "??", "??", "??", "??", "??"]], + [{"name": "Supportability/PHP/package/monolog/monolog/3/detected"}, [833, "??", "??", "??", "??", "??"]], [{"name": "Supportability/library/Monolog/detected"}, [1, "??", "??", "??", "??", "??"]] ] ] diff --git a/tests/integration/logging/monolog3/test_monolog_log_events_max_samples_stored_invalid4.php b/tests/integration/logging/monolog3/test_monolog_log_events_max_samples_stored_invalid4.php index 7879dba27..2f60d6bc1 100644 --- a/tests/integration/logging/monolog3/test_monolog_log_events_max_samples_stored_invalid4.php +++ b/tests/integration/logging/monolog3/test_monolog_log_events_max_samples_stored_invalid4.php @@ -45,6 +45,7 @@ [{"name": "Supportability/Logging/Forwarding/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/Metrics/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/PHP/Monolog/enabled"}, [1, "??", "??", "??", "??", "??"]], + [{"name": "Supportability/PHP/package/monolog/monolog/3/detected"}, [833, "??", "??", "??", "??", "??"]], [{"name": "Supportability/library/Monolog/detected"}, [1, "??", "??", "??", "??", "??"]] ] ] diff --git a/tests/integration/logging/monolog3/test_monolog_log_level_filter.php b/tests/integration/logging/monolog3/test_monolog_log_level_filter.php index 14a0a0c95..529ef1459 100644 --- a/tests/integration/logging/monolog3/test_monolog_log_level_filter.php +++ b/tests/integration/logging/monolog3/test_monolog_log_level_filter.php @@ -60,6 +60,7 @@ [{"name": "Supportability/Logging/Forwarding/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/Metrics/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/PHP/Monolog/enabled"}, [1, "??", "??", "??", "??", "??"]], + [{"name": "Supportability/PHP/package/monolog/monolog/3/detected"}, [8, "??", "??", "??", "??", "??"]], [{"name": "Supportability/library/Monolog/detected"}, [1, "??", "??", "??", "??", "??"]] ] ] diff --git a/tests/integration/logging/monolog3/test_monolog_log_level_filter_invalid.php b/tests/integration/logging/monolog3/test_monolog_log_level_filter_invalid.php index 5659971f3..e5387616f 100644 --- a/tests/integration/logging/monolog3/test_monolog_log_level_filter_invalid.php +++ b/tests/integration/logging/monolog3/test_monolog_log_level_filter_invalid.php @@ -61,6 +61,7 @@ [{"name": "Supportability/Logging/Forwarding/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/Metrics/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/PHP/Monolog/enabled"}, [1, "??", "??", "??", "??", "??"]], + [{"name": "Supportability/PHP/package/monolog/monolog/3/detected"}, [8, "??", "??", "??", "??", "??"]], [{"name": "Supportability/library/Monolog/detected"}, [1, "??", "??", "??", "??", "??"]] ] ] diff --git a/tests/integration/logging/monolog3/test_monolog_truncate_long_msgs.php b/tests/integration/logging/monolog3/test_monolog_truncate_long_msgs.php index ac7e15bcf..4c99e09ba 100644 --- a/tests/integration/logging/monolog3/test_monolog_truncate_long_msgs.php +++ b/tests/integration/logging/monolog3/test_monolog_truncate_long_msgs.php @@ -43,6 +43,7 @@ [{"name": "OtherTransactionTotalTime"}, [1, "??", "??", "??", "??", "??"]], [{"name": "OtherTransactionTotalTime/php__FILE__"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/PHP/Monolog/enabled"}, [1, "??", "??", "??", "??", "??"]], + [{"name": "Supportability/PHP/package/monolog/monolog/3/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/library/Monolog/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/LocalDecorating/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]], [{"name": "Supportability/Logging/Forwarding/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], diff --git a/tests/integration/mysqli/test_explain_reused_id_multiple_001.php b/tests/integration/mysqli/test_explain_reused_id_multiple_001.php new file mode 100644 index 000000000..e5a91d21d --- /dev/null +++ b/tests/integration/mysqli/test_explain_reused_id_multiple_001.php @@ -0,0 +1,123 @@ +prepare("SELECT ?"); +} + +/* Run an SQL query. + Params: + $dbConn mysql connection object + $delay delay for query in seconds + $explainable true if query is explainable, otherwise an + unexplainable sql query is run +*/ +function doSQL($dbConn, $delay, $explainable) { + + /* if sql statement has 2 ';' then agent considers it as multi-statement + and treats it as unexplainable, see nr_php_explain_mysql_query_is_explainable() + */ + if ($explainable) { + $suffix = ""; + } else { + $suffix = ";;"; + } + + $stmt = $dbConn->prepare("SELECT TABLE_NAME FROM information_schema.tables WHERE table_name=? AND SLEEP(?)" . $suffix); + + if (! $stmt) { + throw new Exception("Prepare Failed : " . $dbConn->error); + } + + $table = "STATISTICS"; + $stmt->bind_param('si', $table, $delay); + if (! $stmt->execute()) { + throw new Exception("Execute Failed : " . $stmt->error); + } + + $stmt->bind_result($someId); + $stmt->fetch(); + $stmt->close(); +} + +/* main code */ +require_once(realpath (dirname ( __FILE__ )) . '/../../include/config.php'); + +$dbConn = new mysqli($MYSQL_HOST, $MYSQL_USER, $MYSQL_PASSWD, $MYSQL_DB, $MYSQL_PORT, $MYSQL_SOCKET); + +/* run a test where a prepared, explainable statement is prepared + but not executed. Then run a prepared, unexplainable slow sql + query which should not be explained. This will lead to the + first stmt object being reused for the second slow sql query. + + Tests for reqgression of a bug where the query string + from a previous, explainable SQL query with the same object ID + ("handle") would be used in error. +*/ + +justPrepare($dbConn); +doSQL($dbConn, 1, false); + +echo "If you see this message, it didn't crash\n"; + diff --git a/tests/integration/mysqli/test_explain_reused_id_multiple_002.php b/tests/integration/mysqli/test_explain_reused_id_multiple_002.php new file mode 100644 index 000000000..6e79daf11 --- /dev/null +++ b/tests/integration/mysqli/test_explain_reused_id_multiple_002.php @@ -0,0 +1,176 @@ +prepare("SELECT ?"); +} + +/* Run an SQL query. + Params: + $dbConn mysql connection object + $delay delay for query in seconds + $explainable true if query is explainable, otherwise an + unexplainable sql query is run +*/ +function doSQL($dbConn, $delay, $explainable) { + + /* if sql statement has 2 ';' then agent considers it as multi-statement + and treats it as unexplainable, see nr_php_explain_mysql_query_is_explainable() + */ + if ($explainable) { + $suffix = ""; + } else { + $suffix = ";;"; + } + + $stmt = $dbConn->prepare("SELECT TABLE_NAME FROM information_schema.tables WHERE table_name=? AND SLEEP(?)" . $suffix); + + if (! $stmt) { + throw new Exception("Prepare Failed : " . $dbConn->error); + } + + $table = "STATISTICS"; + $stmt->bind_param('si', $table, $delay); + if (! $stmt->execute()) { + throw new Exception("Execute Failed : " . $stmt->error); + } + + $stmt->bind_result($someId); + $stmt->fetch(); + $stmt->close(); +} + + + +/* main code */ +require_once(realpath (dirname ( __FILE__ )) . '/../../include/config.php'); + +$dbConn = new mysqli($MYSQL_HOST, $MYSQL_USER, $MYSQL_PASSWD, $MYSQL_DB, $MYSQL_PORT, $MYSQL_SOCKET); + +/* run a test where a prepared, explainable statement is prepared + but not executed. Then run a prepared, unexplainable slow sql + query which should not be explained. This will lead to the + first stmt object being reused for the second slow sql query. + Then run an explainable, slow SQL query and confirm it is + explained. + + Tests for reqgression of a bug where the query string + from a previous, explainable SQL query with the same object ID + ("handle") would be used in error. +*/ + +justPrepare($dbConn); +doSQL($dbConn, 1, false); +doSQL($dbConn, 1, true); + +echo "If you see this message, it didn't crash\n"; + diff --git a/tests/integration/predis/predis.inc b/tests/integration/predis/predis.inc index dbf390605..0788d2fb7 100644 --- a/tests/integration/predis/predis.inc +++ b/tests/integration/predis/predis.inc @@ -4,6 +4,10 @@ * SPDX-License-Identifier: Apache-2.0 */ +if (version_compare(PHP_VERSION, '7.2', '<')) { + die("skip: PHP 7.2+ required\n"); +} + $PREDIS_HOME = getenv("PREDIS_HOME"); if (empty($PREDIS_HOME)) { diff --git a/tests/integration/predis/test_basic.php b/tests/integration/predis/test_basic.php index 0adfeaa04..68abdf928 100644 --- a/tests/integration/predis/test_basic.php +++ b/tests/integration/predis/test_basic.php @@ -54,6 +54,7 @@ [{"name":"OtherTransaction/php__FILE__"}, [1, "??", "??", "??", "??", "??"]], [{"name":"OtherTransactionTotalTime"}, [1, "??", "??", "??", "??", "??"]], [{"name":"OtherTransactionTotalTime/php__FILE__"}, [1, "??", "??", "??", "??", "??"]], + [{"name":"Supportability/PHP/package/predis/predis/2/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name":"Supportability/library/Predis/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name":"Supportability/Logging/Forwarding/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], [{"name":"Supportability/Logging/Metrics/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], diff --git a/tests/integration/predis/test_basic_logging_off.php b/tests/integration/predis/test_basic_logging_off.php index 4355fd359..03c84c3bb 100644 --- a/tests/integration/predis/test_basic_logging_off.php +++ b/tests/integration/predis/test_basic_logging_off.php @@ -57,6 +57,7 @@ [{"name":"OtherTransaction/php__FILE__"}, [1, "??", "??", "??", "??", "??"]], [{"name":"OtherTransactionTotalTime"}, [1, "??", "??", "??", "??", "??"]], [{"name":"OtherTransactionTotalTime/php__FILE__"}, [1, "??", "??", "??", "??", "??"]], + [{"name":"Supportability/PHP/package/predis/predis/2/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name":"Supportability/library/Predis/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name":"Supportability/Logging/Forwarding/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]], [{"name":"Supportability/Logging/Metrics/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]], diff --git a/tests/integration/predis/test_basic_reporting_disabled.php b/tests/integration/predis/test_basic_reporting_disabled.php index b8ad0d057..73d262965 100644 --- a/tests/integration/predis/test_basic_reporting_disabled.php +++ b/tests/integration/predis/test_basic_reporting_disabled.php @@ -59,6 +59,7 @@ [{"name":"OtherTransaction/php__FILE__"}, [1, "??", "??", "??", "??", "??"]], [{"name":"OtherTransactionTotalTime"}, [1, "??", "??", "??", "??", "??"]], [{"name":"OtherTransactionTotalTime/php__FILE__"}, [1, "??", "??", "??", "??", "??"]], + [{"name":"Supportability/PHP/package/predis/predis/2/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name":"Supportability/library/Predis/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name":"Supportability/Logging/Forwarding/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], [{"name":"Supportability/Logging/Metrics/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], diff --git a/tests/integration/predis/test_pipeline.php b/tests/integration/predis/test_pipeline.php index 1592084de..32312aab4 100644 --- a/tests/integration/predis/test_pipeline.php +++ b/tests/integration/predis/test_pipeline.php @@ -47,6 +47,7 @@ [{"name":"OtherTransaction/php__FILE__"}, [1, "??", "??", "??", "??", "??"]], [{"name":"OtherTransactionTotalTime"}, [1, "??", "??", "??", "??", "??"]], [{"name":"OtherTransactionTotalTime/php__FILE__"}, [1, "??", "??", "??", "??", "??"]], + [{"name":"Supportability/PHP/package/predis/predis/2/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name":"Supportability/library/Predis/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name":"Supportability/Logging/Forwarding/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], [{"name":"Supportability/Logging/Metrics/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], diff --git a/tests/integration/predis/test_pipeline_atomic.php b/tests/integration/predis/test_pipeline_atomic.php index 620336534..fd695e5ed 100644 --- a/tests/integration/predis/test_pipeline_atomic.php +++ b/tests/integration/predis/test_pipeline_atomic.php @@ -47,6 +47,7 @@ [{"name":"OtherTransaction/php__FILE__"}, [1, "??", "??", "??", "??", "??"]], [{"name":"OtherTransactionTotalTime"}, [1, "??", "??", "??", "??", "??"]], [{"name":"OtherTransactionTotalTime/php__FILE__"}, [1, "??", "??", "??", "??", "??"]], + [{"name":"Supportability/PHP/package/predis/predis/2/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name":"Supportability/library/Predis/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name":"Supportability/Logging/Forwarding/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], [{"name":"Supportability/Logging/Metrics/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], diff --git a/tests/integration/predis/test_pipeline_fire_and_forget.php b/tests/integration/predis/test_pipeline_fire_and_forget.php index ef3fdc2c6..4f7225884 100644 --- a/tests/integration/predis/test_pipeline_fire_and_forget.php +++ b/tests/integration/predis/test_pipeline_fire_and_forget.php @@ -47,6 +47,7 @@ [{"name":"OtherTransaction/php__FILE__"}, [1, "??", "??", "??", "??", "??"]], [{"name":"OtherTransactionTotalTime"}, [1, "??", "??", "??", "??", "??"]], [{"name":"OtherTransactionTotalTime/php__FILE__"}, [1, "??", "??", "??", "??", "??"]], + [{"name":"Supportability/PHP/package/predis/predis/2/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name":"Supportability/library/Predis/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name":"Supportability/Logging/Forwarding/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], [{"name":"Supportability/Logging/Metrics/PHP/enabled"}, [1, "??", "??", "??", "??", "??"]], diff --git a/tests/integration/predis/test_pipeline_fire_and_forget_logging_off.php b/tests/integration/predis/test_pipeline_fire_and_forget_logging_off.php index fc15d052c..82a76903e 100644 --- a/tests/integration/predis/test_pipeline_fire_and_forget_logging_off.php +++ b/tests/integration/predis/test_pipeline_fire_and_forget_logging_off.php @@ -50,6 +50,7 @@ [{"name":"OtherTransaction/php__FILE__"}, [1, "??", "??", "??", "??", "??"]], [{"name":"OtherTransactionTotalTime"}, [1, "??", "??", "??", "??", "??"]], [{"name":"OtherTransactionTotalTime/php__FILE__"}, [1, "??", "??", "??", "??", "??"]], + [{"name":"Supportability/PHP/package/predis/predis/2/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name":"Supportability/library/Predis/detected"}, [1, "??", "??", "??", "??", "??"]], [{"name":"Supportability/Logging/Forwarding/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]], [{"name":"Supportability/Logging/Metrics/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]],