removing new relic #25

This commit is contained in:
Fernando Ontiveros
2025-04-07 05:39:24 +00:00
parent 33813f834f
commit 6a4534efd3
2 changed files with 1 additions and 89 deletions

View File

@@ -144,20 +144,6 @@
</a>
</td>
</tr>
<tr>
<td>
<h2>Advanced Performance Monitor Dashboards</h2>
<p>
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.
<br><a href="http://www.processmaker.com/new-relic-processmaker" target="_blank">Read More»</a>
</p>
</td>
<td>
<a class="image-position">
<img src="/images/dashlets/pm3-advanced-performance-monitor-dashboards-for-processmaker.png" alt="Advanced Performance Dashboards" width="250" height="65">
</a>
</td>
</tr>
<tr>
<td>
<h2>ProcessMaker Monitor &amp; Multi-Tenancy Management</h2>

View File

@@ -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)