Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(monitoring): delete dead newrelic code #1660

Merged
merged 1 commit into from
Jan 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions www/breakdown.inc
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@
require_once('object_detail.inc');
require_once('contentColors.inc');

if(extension_loaded('newrelic')) {
newrelic_add_custom_tracer('getBreakdown');
newrelic_add_custom_tracer('getBreakdownCombined');
}

define('BREAKDOWN_CACHE_VERSION', 4);

/**
Expand Down
5 changes: 0 additions & 5 deletions www/common.inc
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,6 @@ if (isset($_REQUEST['embed'])) {
define('BARE_UI', true);
define('NAV_NO_SHARE', true);
$noanalytics = true;
if (extension_loaded('newrelic'))
@newrelic_disable_autorum();
}
$is_ssl = isSslConnection();
$GLOBALS['cdnPath'] = '';
Expand Down Expand Up @@ -272,9 +270,6 @@ $median_metric = GetSetting('medianMetric') ? GetSetting('medianMetric') : 'load
$testLabel = '';
$page_title = 'WebPageTest Test';
if (strlen($id)) {
if(extension_loaded('newrelic')) {
newrelic_add_custom_parameter ('testID', $id);
}
if (isset($_REQUEST['rkey']) && @strlen($_REQUEST['rkey'])) {
// We are serving a relay request, so munge the id accordingly.
$id = trim(htmlspecialchars($_REQUEST['rkey'])) . ".$id";
Expand Down
4 changes: 0 additions & 4 deletions www/common_lib.inc
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@
require_once(__DIR__ . '/archive.inc');
require_once(__DIR__ . '/util.inc');

if(extension_loaded('newrelic')) {
newrelic_add_custom_tracer('RestoreTest');
}

define('VIDEO_CODE_VERSION', 20);

require_once(__DIR__ . '/logging.inc');
Expand Down
11 changes: 0 additions & 11 deletions www/devtools.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,6 @@
$DevToolsCacheVersion = '1.7';
require_once __DIR__ . '/include/TestPaths.php';

if(extension_loaded('newrelic')) {
newrelic_add_custom_tracer('GetTimeline');
newrelic_add_custom_tracer('GetDevToolsRequests');
newrelic_add_custom_tracer('GetDevToolsEventsForStep');
newrelic_add_custom_tracer('DevToolsGetConsoleLog');
newrelic_add_custom_tracer('DevToolsGetCPUSlicesForStep');
newrelic_add_custom_tracer('GetDevToolsCPUTime');
newrelic_add_custom_tracer('ParseDevToolsEvents');
newrelic_add_custom_tracer('DevToolsMatchEvent');
}

/**
* Load the timeline data for the given test run (from a timeline file or a raw dev tools dump)
*
Expand Down
12 changes: 0 additions & 12 deletions www/ec2/ec2.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,6 @@
require_once('./common_lib.inc');
require_once('./lib/aws/aws-autoloader.php');

if(extension_loaded('newrelic')) {
newrelic_add_custom_tracer('EC2_StartInstanceIfNeeded');
newrelic_add_custom_tracer('EC2_StartInstance');
newrelic_add_custom_tracer('EC2_TerminateIdleInstances');
newrelic_add_custom_tracer('EC2_GetRunningInstances');
newrelic_add_custom_tracer('EC2_SendInstancesOffline');
newrelic_add_custom_tracer('EC2_StartNeededInstances');
newrelic_add_custom_tracer('EC2_TerminateInstance');
newrelic_add_custom_tracer('EC2_LaunchInstance');
}


/**
* Tests are pending for the given location, start instances as necessary
*
Expand Down
4 changes: 0 additions & 4 deletions www/footer.inc
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,5 @@
include('./settings/customfooter.inc.php');
}
?>
<?php
if(!isset($noanalytics) && extension_loaded('newrelic'))
echo @newrelic_get_browser_timing_footer();
?>

<div id="experiment-timing" style="color: #77A;"></div>
2 changes: 0 additions & 2 deletions www/head.inc
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ if( strlen($page_description) )
}
</style>
<?php
if(!isset($noanalytics) && extension_loaded('newrelic'))
echo @newrelic_get_browser_timing_header();
if (file_exists('./settings/server/customhead.inc.php')) {
include('./settings/server/customhead.inc.php');
} elseif (file_exists('./settings/common/customhead.inc.php')) {
Expand Down
8 changes: 0 additions & 8 deletions www/object_detail.inc
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,6 @@
require_once __DIR__ . '/devtools.inc.php';
require_once __DIR__ . '/include/UrlGenerator.php';

if(extension_loaded('newrelic')) {
newrelic_add_custom_tracer('LoadRequests');
newrelic_add_custom_tracer('FixUpRequestTimes');
newrelic_add_custom_tracer('AddHeaders');
newrelic_add_custom_tracer('AddResponseBodyFlags');
newrelic_add_custom_tracer('BuildRequestDependencies');
}

/**
* Load the object data file.
*/
Expand Down
7 changes: 0 additions & 7 deletions www/runtest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,6 @@
// Copyright 2020 Catchpoint Systems Inc.
// Use of this source code is governed by the Polyform Shield 1.0.0 license that can be
// found in the LICENSE.md file.
if(extension_loaded('newrelic')) {
newrelic_add_custom_tracer('CheckUrl');
newrelic_add_custom_tracer('CheckIp');
newrelic_add_custom_tracer('WptHookValidateTest');
newrelic_add_custom_tracer('GetRedirect');
newrelic_add_custom_tracer('ReportAnalytics');
}

// deal with magic quotes being enabled
if (get_magic_quotes_gpc()) {
Expand Down
4 changes: 0 additions & 4 deletions www/templates/layouts/footer.inc
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,5 @@ if( !strcasecmp('Test Result', $tab) && (!isset($nosubheader) || !@$nosubheader)
require(__DIR__ . '/../../settings/customfooter.inc.php');
}
?>
<?php
if(!isset($noanalytics) && extension_loaded('newrelic'))
echo @newrelic_get_browser_timing_footer();
?>

<div id="experiment-timing" style="color: #77A;"></div>
2 changes: 0 additions & 2 deletions www/templates/layouts/head.inc
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ if( strlen($page_description) )
}
</style>
<?php
if(!isset($noanalytics) && extension_loaded('newrelic'))
echo @newrelic_get_browser_timing_header();
if (file_exists(__DIR__ . '/../../settings/server/customhead.inc.php')) {
include(__DIR__ . '/../../settings/server/customhead.inc.php');
} elseif (file_exists(__DIR__ . '/../../settings/common/customhead.inc.php')) {
Expand Down
3 changes: 0 additions & 3 deletions www/testStatus.inc
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
// found in the LICENSE.md file.
require_once(__DIR__ . '/common_lib.inc');
require_once(__DIR__ . '/page_data.inc');
if(extension_loaded('newrelic')) {
newrelic_add_custom_tracer('GetRelayStatus');
}

$testQueue = array();
$testInfoJson = null;
Expand Down
7 changes: 0 additions & 7 deletions www/testlog.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,6 @@
if (isset($filterstr) && $supportsGrep)
$filterstr = trim(escapeshellarg(str_replace(array('"', "'", '\\'), '', trim($filterstr))), "'\"");

if(extension_loaded('newrelic')) {
newrelic_add_custom_parameter('filter', $filter);
newrelic_add_custom_parameter('days', $days);
newrelic_add_custom_parameter('all', $all);
newrelic_add_custom_parameter('nolimit', $nolimit);
}

$includeip = false;
$includePrivate = false;
if ($admin) {
Expand Down
9 changes: 0 additions & 9 deletions www/thumbnail.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,6 @@
// Copyright 2020 Catchpoint Systems Inc.
// Use of this source code is governed by the Polyform Shield 1.0.0 license that can be
// found in the LICENSE.md file.
if(extension_loaded('newrelic')) {
newrelic_add_custom_tracer('tbnDrawWaterfall');
newrelic_add_custom_tracer('tbnDrawChecklist');
newrelic_add_custom_tracer('tbnLoadImage');
newrelic_add_custom_tracer('GenerateThumbnail');
newrelic_add_custom_tracer('SendImage');
newrelic_add_custom_tracer('getRequests');
newrelic_add_custom_tracer('loadPageRunData');
}

if(array_key_exists("HTTP_IF_MODIFIED_SINCE",$_SERVER) && strlen(trim($_SERVER['HTTP_IF_MODIFIED_SINCE'])))
{
Expand Down
3 changes: 0 additions & 3 deletions www/updateFeeds.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
// Copyright 2020 Catchpoint Systems Inc.
// Use of this source code is governed by the Polyform Shield 1.0.0 license that can be
// found in the LICENSE.md file.
if(extension_loaded('newrelic')) {
newrelic_add_custom_tracer('UpdateFeeds');
}

/**
* Update the feeds
Expand Down
4 changes: 0 additions & 4 deletions www/video/visualProgress.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@
// Use of this source code is governed by the Polyform Shield 1.0.0 license that can be
// found in the LICENSE.md file.

if(extension_loaded('newrelic')) {
newrelic_add_custom_tracer('GetVisualProgress');
newrelic_add_custom_tracer('GetImageHistogram');
}
require_once(__DIR__ . '/../devtools.inc.php');

/**
Expand Down
15 changes: 0 additions & 15 deletions www/work/getwork.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,6 @@
// Copyright 2020 Catchpoint Systems Inc.
// Use of this source code is governed by the Polyform Shield 1.0.0 license that can be
// found in the LICENSE.md file.
if(extension_loaded('newrelic')) {
newrelic_add_custom_tracer('GetUpdate');
newrelic_add_custom_tracer('GetJob');
newrelic_add_custom_tracer('GetTestJob');
newrelic_add_custom_tracer('CheckCron');
newrelic_add_custom_tracer('GetTesters');
newrelic_add_custom_tracer('LockLocation');
newrelic_add_custom_tracer('GetLocationInfo');
newrelic_add_custom_tracer('LockTest');
newrelic_add_custom_tracer('UpdateTester');
newrelic_add_custom_tracer('GetTesterIndex');
newrelic_add_custom_tracer('StartTest');
newrelic_add_custom_tracer('TestToJSON');
newrelic_add_custom_tracer('logTestMsg');
}

chdir('..');
include 'common.inc';
Expand Down
7 changes: 0 additions & 7 deletions www/work/postprocess.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,6 @@
if (function_exists('fastcgi_finish_request'))
fastcgi_finish_request();

if(extension_loaded('newrelic')) {
newrelic_add_custom_tracer('ArchiveTest');
newrelic_add_custom_tracer('loadAllPageData');
newrelic_add_custom_tracer('SendBeacon');
newrelic_add_custom_tracer('SendCallback');
}

if (array_key_exists('test', $_REQUEST)) {
$id = $_REQUEST['test'];
if (ValidateTestId($id)) {
Expand Down
23 changes: 0 additions & 23 deletions www/work/workdone.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,6 @@
// Copyright 2020 Catchpoint Systems Inc.
// Use of this source code is governed by the Polyform Shield 1.0.0 license that can be
// found in the LICENSE.md file.
if(extension_loaded('newrelic')) {
newrelic_add_custom_tracer('ProcessRun');
newrelic_add_custom_tracer('loadAllPageData');
newrelic_add_custom_tracer('getRequestsForStep');
newrelic_add_custom_tracer('LockTest');
newrelic_add_custom_tracer('UpdateTester');
newrelic_add_custom_tracer('GetVisualProgressForStep');
newrelic_add_custom_tracer('GetDevToolsCPUTimeForStep');
newrelic_add_custom_tracer('GetDevToolsRequestsForStep');
newrelic_add_custom_tracer('loadUserTimingData');
newrelic_add_custom_tracer('GetVisualProgress');
newrelic_add_custom_tracer('DevToolsGetConsoleLog');
newrelic_add_custom_tracer('SecureDir');
newrelic_add_custom_tracer('loadPageRunData');
newrelic_add_custom_tracer('loadPageStepData');
newrelic_add_custom_tracer('ParseUserTiming');
newrelic_add_custom_tracer('CalculateTimeToInteractive');

}

chdir('..');
//$debug = true;
Expand Down Expand Up @@ -70,10 +51,6 @@
ob_flush();
flush();

if(extension_loaded('newrelic')) {
newrelic_add_custom_parameter('test', $id);
}

$workdone_start = microtime(true);

//logmsg(json_encode($_REQUEST), './work/workdone.log', true);
Expand Down
9 changes: 0 additions & 9 deletions www/xmlResult.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,6 @@
// Copyright 2020 Catchpoint Systems Inc.
// Use of this source code is governed by the Polyform Shield 1.0.0 license that can be
// found in the LICENSE.md file.
if(extension_loaded('newrelic')) {
newrelic_add_custom_tracer('GetTestStatus');
newrelic_add_custom_tracer('calculatePageStats');
newrelic_add_custom_tracer('xmlDomains');
newrelic_add_custom_tracer('xmlBreakdown');
newrelic_add_custom_tracer('xmlRequests');
newrelic_add_custom_tracer('GetVisualProgress');
newrelic_add_custom_tracer('ArchiveApi');
}

$msStart = microtime(true);

Expand Down