Download the PHP package pantheon-quicksilver/new-relic-apdex-t without Composer
On this page you can find all versions of the php package pantheon-quicksilver/new-relic-apdex-t. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download pantheon-quicksilver/new-relic-apdex-t
More information about pantheon-quicksilver/new-relic-apdex-t
Files in pantheon-quicksilver/new-relic-apdex-t
Package new-relic-apdex-t
Short Description Set New Relic Apdex T values on Multidev Creation.
License MIT
Homepage https://github.com/pantheon-quicksilver/new-relic-apdex-t
Informations about the package new-relic-apdex-t
Set New Relic Apdex T values on Multidev Creation
All sites on Pantheon include access to New Relic APM Pro. This application performance monitoring relies on the site owners setting time benchmark to measure against. Ideally, your Drupal or WordPress responds quickly to requests. And if the site is not responding quickly, New Relic can alert you.
The question is, where do you want to set the bar? By default, New Relic uses 0.5 as the target number of seconds. This value is called "T" in the Apdex (Application Performance Index) formula.
In addition to monitoring how fast the server (Drupal or WordPress) respond, New Relic can monitor how fast real world browsers render your site. Browser performance is measured with the same Apdex formula. By default, New Relic uses a much more generous 7 seconds as the T value in browser Apdex.
We recommend that any team working on a site discuss expectations for server-side and client-side performance and set T values accordingly. As you are developing new features with Pantheon Multidev, you might even want the Multidev environments to have more stringent T values than Test or Live environments.
This Quicksilver example shows how you can set custom T values for Multidev environments when they are created. Otherwise each environment will use the default values of 0.5 and 7 for server and browser respectively.
To do the actual setting of default values this script first gets an API key and then uses that key to interact with New Relic's REST API to set a T values based on the existing values from the dev (or test/live) environment.
Requirements
While these scripts can be downloaded individually, they are meant to work with Composer. See the installation in the next section.
- Quicksilver script projects and the script name itself should be consistent in naming convention.
- README should include a recommendation for types of hooks and stages that the script should run on.
- For example, "This script should run on
clone_database
and theafter
stage. - Provide a snippet that can be pasted into the
pantheon.yml
file.
- For example, "This script should run on
Installation
You should Activate New Relic Pro within your site dashboard.
This project is designed to be included from a site's composer.json
file, and placed in its appropriate installation directory by Composer Installers.
In order for this to work, you should have the following in your composer.json file:
The project can be included by using the command:
composer require pantheon-quicksilver/new-relic-apdex-t:^1
If you are using one of the example PR workflow projects (Drupal 8, Drupal 9, WordPress) as a starting point for your site, these entries should already be present in your composer.json
.
One gotcha is that this script cannot be the first or only script called as part of Multidev creation. Before the New Relic API recognizes the the Multidev environment, that environment needs to have received at least one previous request.
Example pantheon.yml
Here's an example of what your pantheon.yml
would look like if this were the only Quicksilver operation you wanted to use.