removing new relic #25
This commit is contained in:
@@ -144,20 +144,6 @@
|
|||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</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>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<h2>ProcessMaker Monitor & Multi-Tenancy Management</h2>
|
<h2>ProcessMaker Monitor & Multi-Tenancy Management</h2>
|
||||||
|
|||||||
@@ -13,57 +13,6 @@ use ProcessMaker\Validation\ValidationUploadedFiles;
|
|||||||
* this file is used initialize main variables, redirect and dispatch all requests
|
* 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
|
// Validating if exists 'HTTP_USER_AGENT' key in $_SERVER array
|
||||||
if (!isset($_SERVER['HTTP_USER_AGENT'])) {
|
if (!isset($_SERVER['HTTP_USER_AGENT'])) {
|
||||||
$_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;
|
$pluginFilename = PATH_PLUGINS . $pluginFolder . PATH_SEP . 'public_html' . PATH_SEP . $filePath;
|
||||||
|
|
||||||
if (file_exists($pluginFilename)) {
|
if (file_exists($pluginFilename)) {
|
||||||
//NewRelic Snippet - By JHL
|
|
||||||
transactionLog($pluginFilename);
|
|
||||||
|
|
||||||
Bootstrap::streamFile($pluginFilename, false, '', true);
|
Bootstrap::streamFile($pluginFilename, false, '', true);
|
||||||
}
|
}
|
||||||
die();
|
die();
|
||||||
@@ -436,9 +382,6 @@ if (Bootstrap::virtualURI($_SERVER['REQUEST_URI'], $virtualURITable, $realPath))
|
|||||||
$fileToBeStreamed = str_replace("/skin/", PATH_CUSTOM_SKINS, $url);
|
$fileToBeStreamed = str_replace("/skin/", PATH_CUSTOM_SKINS, $url);
|
||||||
|
|
||||||
if (file_exists($fileToBeStreamed)) {
|
if (file_exists($fileToBeStreamed)) {
|
||||||
//NewRelic Snippet - By JHL
|
|
||||||
transactionLog($fileToBeStreamed);
|
|
||||||
|
|
||||||
Bootstrap::streamFile($fileToBeStreamed);
|
Bootstrap::streamFile($fileToBeStreamed);
|
||||||
}
|
}
|
||||||
die();
|
die();
|
||||||
@@ -448,8 +391,6 @@ if (Bootstrap::virtualURI($_SERVER['REQUEST_URI'], $virtualURITable, $realPath))
|
|||||||
case 'jsMethod':
|
case 'jsMethod':
|
||||||
Bootstrap::parseURI(getenv("REQUEST_URI"));
|
Bootstrap::parseURI(getenv("REQUEST_URI"));
|
||||||
$filename = PATH_METHODS . SYS_COLLECTION . '/' . SYS_TARGET . '.js';
|
$filename = PATH_METHODS . SYS_COLLECTION . '/' . SYS_TARGET . '.js';
|
||||||
//NewRelic Snippet - By JHL
|
|
||||||
transactionLog($filename);
|
|
||||||
Bootstrap::streamFile($filename);
|
Bootstrap::streamFile($filename);
|
||||||
die();
|
die();
|
||||||
break;
|
break;
|
||||||
@@ -465,9 +406,6 @@ if (Bootstrap::virtualURI($_SERVER['REQUEST_URI'], $virtualURITable, $realPath))
|
|||||||
//Process files loaded with tag head in HTML
|
//Process files loaded with tag head in HTML
|
||||||
$realPath = explode('?', $realPath);
|
$realPath = explode('?', $realPath);
|
||||||
$realPath[0] .= strpos(basename($realPath[0]), '.') === false ? '.php' : '';
|
$realPath[0] .= strpos(basename($realPath[0]), '.') === false ? '.php' : '';
|
||||||
//NewRelic Snippet - By JHL
|
|
||||||
transactionLog($realPath[0]);
|
|
||||||
|
|
||||||
Bootstrap::streamFile($realPath[0]);
|
Bootstrap::streamFile($realPath[0]);
|
||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
@@ -526,8 +464,6 @@ if (!defined('PATH_DATA') || !file_exists(PATH_DATA)) {
|
|||||||
app()->make(Kernel::class)->bootstrap();
|
app()->make(Kernel::class)->bootstrap();
|
||||||
restore_error_handler();
|
restore_error_handler();
|
||||||
|
|
||||||
//NewRelic Snippet - By JHL
|
|
||||||
transactionLog(PATH_CONTROLLERS . 'InstallerModule.php');
|
|
||||||
$pathFile = PATH_CONTROLLERS . 'InstallerModule.php';
|
$pathFile = PATH_CONTROLLERS . 'InstallerModule.php';
|
||||||
require_once ($pathFile);
|
require_once ($pathFile);
|
||||||
$controller = InstallerModule::class;
|
$controller = InstallerModule::class;
|
||||||
@@ -545,8 +481,6 @@ if (!defined('PATH_DATA') || !file_exists(PATH_DATA)) {
|
|||||||
if (method_exists(InstallerModule::class, $controllerAction)) {
|
if (method_exists(InstallerModule::class, $controllerAction)) {
|
||||||
$installer = new $controller();
|
$installer = new $controller();
|
||||||
$installer->setHttpRequestData($_REQUEST);
|
$installer->setHttpRequestData($_REQUEST);
|
||||||
//NewRelic Snippet - By JHL
|
|
||||||
transactionLog($controllerAction);
|
|
||||||
|
|
||||||
$installer->call($controllerAction);
|
$installer->call($controllerAction);
|
||||||
} else {
|
} else {
|
||||||
@@ -611,8 +545,6 @@ if (defined('SYS_TEMP') && SYS_TEMP != '') {
|
|||||||
} else { //when we are in global pages, outside any valid workspace
|
} else { //when we are in global pages, outside any valid workspace
|
||||||
if (SYS_TARGET === 'newSite') {
|
if (SYS_TARGET === 'newSite') {
|
||||||
$phpFile = G::ExpandPath('methods') . SYS_COLLECTION . "/" . SYS_TARGET . '.php';
|
$phpFile = G::ExpandPath('methods') . SYS_COLLECTION . "/" . SYS_TARGET . '.php';
|
||||||
//NewRelic Snippet - By JHL
|
|
||||||
transactionLog($phpFile);
|
|
||||||
require_once($phpFile);
|
require_once($phpFile);
|
||||||
die();
|
die();
|
||||||
} else {
|
} else {
|
||||||
@@ -808,8 +740,6 @@ if (substr(SYS_COLLECTION, 0, 8) === 'gulliver') {
|
|||||||
$phpFile = $aAux[0];
|
$phpFile = $aAux[0];
|
||||||
|
|
||||||
if ($extension != 'php') {
|
if ($extension != 'php') {
|
||||||
//NewRelic Snippet - By JHL
|
|
||||||
transactionLog($phpFile);
|
|
||||||
Bootstrap::streamFile($phpFile);
|
Bootstrap::streamFile($phpFile);
|
||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
@@ -1087,8 +1017,7 @@ if (!defined('EXECUTE_BY_CRON')) {
|
|||||||
ValidationUploadedFiles::getValidationUploadedFiles()
|
ValidationUploadedFiles::getValidationUploadedFiles()
|
||||||
->runRulesToAllUploadedFiles();
|
->runRulesToAllUploadedFiles();
|
||||||
$controller = new $controllerClass();
|
$controller = new $controllerClass();
|
||||||
$controller->setHttpRequestData($_REQUEST);//NewRelic Snippet - By JHL
|
$controller->setHttpRequestData($_REQUEST);
|
||||||
transactionLog($controllerAction);
|
|
||||||
|
|
||||||
if ($isPluginController) {
|
if ($isPluginController) {
|
||||||
$controller->setPluginName($pluginName);
|
$controller->setPluginName($pluginName);
|
||||||
@@ -1097,9 +1026,6 @@ if (!defined('EXECUTE_BY_CRON')) {
|
|||||||
|
|
||||||
$controller->call($controllerAction);
|
$controller->call($controllerAction);
|
||||||
} else {
|
} else {
|
||||||
//NewRelic Snippet - By JHL
|
|
||||||
transactionLog($phpFile);
|
|
||||||
|
|
||||||
ChangeLog::getChangeLog()
|
ChangeLog::getChangeLog()
|
||||||
->setSourceId(ChangeLog::FromWeb)
|
->setSourceId(ChangeLog::FromWeb)
|
||||||
->setSkin(SYS_SKIN)
|
->setSkin(SYS_SKIN)
|
||||||
|
|||||||
Reference in New Issue
Block a user