A machine-readable guide to this site for AI agents and language models is available at/llms.txt(https://dev.acquia.com/llms.txt on the production site).
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 a multisite configuration, 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.prod.)
For each Drupal website that you want to monitor with New Relic, complete the following steps, depending on if you are using Cloud Platform or Site Factory:
Cloud Platform
Add the following code to the end of the website’s settings.php file:
if (extension_loaded('newrelic')) {
$exploded_path = explode('/', dirname(__FILE__));
$site_domain = array_pop($exploded_path);
newrelic_set_appname("$site_domain;CURRENT_APP_NAME", '', 'true');
}
Site Factory
For a post-settings.php hook script to use with your websites, see Altering values in settings.php with hooks.
The $site_domain variable is assigned the name of the folder for this particular settings.php file. This appears in your list of applications on New Relic’s website. To find this list, go to New Relic.
The newrelic_set_appname() function uses the following three parameters:
CURRENT_APP_NAME with whatever the New Relic App name currently is. You can find this in New Relic under Settings > For additional documentation regarding New Relic, see their documentation website.
newrelic.appnametrue, New Relic will keep the trace collected so far. This has a slight performance impact.If this content did not answer your questions, try searching or contacting our support team for further assistance.
newrelic.appnametrue, New Relic will keep the trace collected so far. This has a slight performance impact.If this content did not answer your questions, try searching or contacting our support team for further assistance.