From 6a4534efd31dd6b711f7262ab84ce7cce3f2f4cf Mon Sep 17 00:00:00 2001 From: Fernando Ontiveros Date: Mon, 7 Apr 2025 05:39:24 +0000 Subject: [PATCH] removing new relic #25 --- .../dashletProcessMakerEnterprisePm3.html | 14 ---- workflow/public_html/sysGeneric.php | 76 +------------------ 2 files changed, 1 insertion(+), 89 deletions(-) diff --git a/workflow/engine/templates/dashboard/dashletProcessMakerEnterprisePm3.html b/workflow/engine/templates/dashboard/dashletProcessMakerEnterprisePm3.html index 3ee71fc02..260e4afd4 100644 --- a/workflow/engine/templates/dashboard/dashletProcessMakerEnterprisePm3.html +++ b/workflow/engine/templates/dashboard/dashletProcessMakerEnterprisePm3.html @@ -144,20 +144,6 @@ - - -

Advanced Performance Monitor Dashboards

-

- Displays the information provided by the New Relic application within ProcessMaker. New Relic is a useful tool for reporting on system performance and delivers numerous dashboards for administrators. -
Read MoreĀ» -

- - - - Advanced Performance Dashboards - - -

ProcessMaker Monitor & Multi-Tenancy Management

diff --git a/workflow/public_html/sysGeneric.php b/workflow/public_html/sysGeneric.php index dd06c913e..0bbb08d33 100644 --- a/workflow/public_html/sysGeneric.php +++ b/workflow/public_html/sysGeneric.php @@ -13,57 +13,6 @@ use ProcessMaker\Validation\ValidationUploadedFiles; * this file is used initialize main variables, redirect and dispatch all requests */ -function transactionLog($transactionName) -{ - if (extension_loaded('newrelic')) { - $baseName = "ProcessMaker"; - - //Application base name - newrelic_set_appname($baseName); - - //Initialize Laravel app if is not booted - if (!app()->isBooted()) { - app()->make(Kernel::class)->bootstrap(); - restore_error_handler(); - } - - //Custom parameters - if (!empty(config("system.workspace"))) { - newrelic_add_custom_parameter("workspace", config("system.workspace")); - } - if (defined("SYS_LANG")) { - newrelic_add_custom_parameter("lang", SYS_LANG); - } - if (defined("SYS_SKIN")) { - newrelic_add_custom_parameter("skin", SYS_SKIN); - } - if (defined("SYS_COLLECTION")) { - newrelic_add_custom_parameter("collection", SYS_COLLECTION); - } - if (defined("SYS_TARGET")) { - newrelic_add_custom_parameter("target", SYS_TARGET); - } - if (defined("SYS_URI")) { - newrelic_add_custom_parameter("uri", SYS_URI); - } - if (defined("PATH_CORE")) { - newrelic_add_custom_parameter("path_core", PATH_CORE); - } - if (defined("PATH_DATA_SITE")) { - newrelic_add_custom_parameter("path_site", PATH_DATA_SITE); - } - - //Show correct transaction name - if (!empty(config("system.workspace"))) { - newrelic_set_appname("PM-" . config("system.workspace") . ";$baseName"); - } - if (defined("PATH_CORE")) { - $transactionName = str_replace(PATH_CORE, "", $transactionName); - } - newrelic_name_transaction($transactionName); - } -} - // Validating if exists 'HTTP_USER_AGENT' key in $_SERVER array if (!isset($_SERVER['HTTP_USER_AGENT'])) { $_SERVER['HTTP_USER_AGENT'] = ''; @@ -408,9 +357,6 @@ if (Bootstrap::virtualURI($_SERVER['REQUEST_URI'], $virtualURITable, $realPath)) $pluginFilename = PATH_PLUGINS . $pluginFolder . PATH_SEP . 'public_html' . PATH_SEP . $filePath; if (file_exists($pluginFilename)) { - //NewRelic Snippet - By JHL - transactionLog($pluginFilename); - Bootstrap::streamFile($pluginFilename, false, '', true); } die(); @@ -436,9 +382,6 @@ if (Bootstrap::virtualURI($_SERVER['REQUEST_URI'], $virtualURITable, $realPath)) $fileToBeStreamed = str_replace("/skin/", PATH_CUSTOM_SKINS, $url); if (file_exists($fileToBeStreamed)) { - //NewRelic Snippet - By JHL - transactionLog($fileToBeStreamed); - Bootstrap::streamFile($fileToBeStreamed); } die(); @@ -448,8 +391,6 @@ if (Bootstrap::virtualURI($_SERVER['REQUEST_URI'], $virtualURITable, $realPath)) case 'jsMethod': Bootstrap::parseURI(getenv("REQUEST_URI")); $filename = PATH_METHODS . SYS_COLLECTION . '/' . SYS_TARGET . '.js'; - //NewRelic Snippet - By JHL - transactionLog($filename); Bootstrap::streamFile($filename); die(); break; @@ -465,9 +406,6 @@ if (Bootstrap::virtualURI($_SERVER['REQUEST_URI'], $virtualURITable, $realPath)) //Process files loaded with tag head in HTML $realPath = explode('?', $realPath); $realPath[0] .= strpos(basename($realPath[0]), '.') === false ? '.php' : ''; - //NewRelic Snippet - By JHL - transactionLog($realPath[0]); - Bootstrap::streamFile($realPath[0]); die(); } @@ -526,8 +464,6 @@ if (!defined('PATH_DATA') || !file_exists(PATH_DATA)) { app()->make(Kernel::class)->bootstrap(); restore_error_handler(); - //NewRelic Snippet - By JHL - transactionLog(PATH_CONTROLLERS . 'InstallerModule.php'); $pathFile = PATH_CONTROLLERS . 'InstallerModule.php'; require_once ($pathFile); $controller = InstallerModule::class; @@ -545,8 +481,6 @@ if (!defined('PATH_DATA') || !file_exists(PATH_DATA)) { if (method_exists(InstallerModule::class, $controllerAction)) { $installer = new $controller(); $installer->setHttpRequestData($_REQUEST); - //NewRelic Snippet - By JHL - transactionLog($controllerAction); $installer->call($controllerAction); } else { @@ -611,8 +545,6 @@ if (defined('SYS_TEMP') && SYS_TEMP != '') { } else { //when we are in global pages, outside any valid workspace if (SYS_TARGET === 'newSite') { $phpFile = G::ExpandPath('methods') . SYS_COLLECTION . "/" . SYS_TARGET . '.php'; - //NewRelic Snippet - By JHL - transactionLog($phpFile); require_once($phpFile); die(); } else { @@ -808,8 +740,6 @@ if (substr(SYS_COLLECTION, 0, 8) === 'gulliver') { $phpFile = $aAux[0]; if ($extension != 'php') { - //NewRelic Snippet - By JHL - transactionLog($phpFile); Bootstrap::streamFile($phpFile); die(); } @@ -1087,8 +1017,7 @@ if (!defined('EXECUTE_BY_CRON')) { ValidationUploadedFiles::getValidationUploadedFiles() ->runRulesToAllUploadedFiles(); $controller = new $controllerClass(); - $controller->setHttpRequestData($_REQUEST);//NewRelic Snippet - By JHL - transactionLog($controllerAction); + $controller->setHttpRequestData($_REQUEST); if ($isPluginController) { $controller->setPluginName($pluginName); @@ -1097,9 +1026,6 @@ if (!defined('EXECUTE_BY_CRON')) { $controller->call($controllerAction); } else { - //NewRelic Snippet - By JHL - transactionLog($phpFile); - ChangeLog::getChangeLog() ->setSourceId(ChangeLog::FromWeb) ->setSkin(SYS_SKIN)