Date Published: March 2, 2022
Using New Relic monitoring on ACSF
New Relic is a website performance monitoring service that can enable you to determine where bottlenecks exist in your Cloud Platform application. After sufficient traffic is requested from that environment, New Relic will begin to analyze the available data.
If you have an Acquia Site Factory application, you can also have New Relic report data on a per-website basis, which requires that each website have its own unique New Relic App name. (New Relic's PHP API contains a call for setting your app name.) This data is available only for the environment as a whole, and you view it by selecting the appropriate sitename.env
option from the list of available applications (for example, mysite.01live
.)
To enable New Relic monitoring in a multisite environment, like Site Factory, create a post-settings.php
script named new_relic.php
containing the following code, replacing <CURRENT_APP_NAME> with the name of your application:
if (extension_loaded('newrelic')) {
$env = 'local';
if (isset($_ENV['AH_SITE_ENVIRONMENT'])) {
$env = $_ENV['AH_SITE_ENVIRONMENT'];
}
global $_acsf_site_name;
newrelic_set_appname("<current_app_name>.$env.$_acsf_site_name; <current_app_name>.$env", '', 'true');
}
Did not find what you were looking for?
If this content did not answer your questions, try searching or contacting our support team for further assistance.