Testing Website Performance with New Relic
Post-launch New Relic setup
After your site is live it’s time to activate New Relic Pro. If the site is hosted on Pantheon then it’s included in your hosting plan.
Navigate to the Live environment tab on Pantheon dashboard and at the bottom of control panel click on New Relic tab.
Then click on Activate New Relic Pro. The activation process may take a few minutes.
Once finished click Go to New Relic and then click on the application name (your site name). You will be taken to the site’s dashboard. An application represents an environment. Keep an eye that you are monitoring live.
In the overview you will see the real time performance and transactions that are the most costly.
Start your analysis with looking at them.
Set up Uptime Monitors
Ping Monitor
Simple ping monitor ensures your website is responding. To add monitor click on the Synthetics tab in New Relic.
Then click Create new monitor. Select type of the monitor Ping and fill in the details. Attaching simple Ping to a home page is a good idea.
Set up Notification Channel
Go to Alerts tab and click on the Notification channels sub-tab. Click there and setup a channel. You can add a Slack integration among other options.
Create Alert Policy
Create alert policy and attach Slack notification channel to it.
Add condition that the alert goes off if monitor fails.
Setup Deployments Tracking
Add quicksilver script into your /web/private/scripts directory. The link to the script can be found here.
Update your pantheon.yml with the following:
workflows:
# Log to New Relic when deploying to test or live.
deploy:
after:
- type: webphp
description: Log to New Relic
script: private/scripts/new_relic_deploy.php
# Also log sync_code so you can track new code going into dev/multidev.
sync_code:
after:
- type: webphp
description: Log to New Relic
script: private/scripts/new_relic_deploy.php
Deploy.
After that you should see deployments in the deployments tab of New Relic interface for the application:
If you click on the time marker you will be taken to a screen with more details about the deployments process: e. g. CPU usage, Apdex, how the deployment was triggered.
Â
Â