2021-09-26 15:25:58 +02:00
|
|
|
|
<!-- DO NOT EDIT THIS FILE! -->
|
|
|
|
|
<!-- Instead edit contrib/newrelic.php -->
|
|
|
|
|
<!-- Then run bin/docgen -->
|
|
|
|
|
|
2022-07-26 09:18:44 +02:00
|
|
|
|
# Newrelic Recipe
|
2021-09-26 15:25:58 +02:00
|
|
|
|
|
|
|
|
|
```php
|
|
|
|
|
require 'contrib/newrelic.php';
|
|
|
|
|
```
|
|
|
|
|
|
2022-09-12 12:29:44 +02:00
|
|
|
|
[Source](/contrib/newrelic.php)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-09-26 15:25:58 +02:00
|
|
|
|
## Configuration
|
|
|
|
|
|
|
|
|
|
- `newrelic_app_id` – newrelic's app id
|
|
|
|
|
- `newrelic_api_key` – newrelic's api key
|
|
|
|
|
- `newrelic_description` – message to send
|
2023-01-08 22:34:11 +02:00
|
|
|
|
- `newrelic_endpoint` – newrelic's REST API endpoint
|
2021-09-26 15:25:58 +02:00
|
|
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
|
|
|
|
|
Since you should only notify New Relic of a successful deployment, the `newrelic:notify` task should be executed right at the end.
|
|
|
|
|
|
|
|
|
|
```php
|
|
|
|
|
after('deploy', 'newrelic:notify');
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## Configuration
|
|
|
|
|
### newrelic_app_id
|
2023-01-08 22:34:11 +02:00
|
|
|
|
[Source](https://github.com/deployphp/deployer/blob/master/contrib/newrelic.php#L23)
|
2021-09-26 15:25:58 +02:00
|
|
|
|
|
|
|
|
|
|
2022-09-12 12:53:42 +02:00
|
|
|
|
:::info Required
|
|
|
|
|
Throws exception if not set.
|
|
|
|
|
:::
|
|
|
|
|
|
2021-09-26 15:25:58 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
### newrelic_description
|
2023-01-08 22:34:11 +02:00
|
|
|
|
[Source](https://github.com/deployphp/deployer/blob/master/contrib/newrelic.php#L27)
|
2021-09-26 15:25:58 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-09-12 12:53:42 +02:00
|
|
|
|
```php title="Default value"
|
|
|
|
|
return runLocally('git log -n 1 --format="%an: %s" | tr \'"\' "\'"');
|
|
|
|
|
```
|
2021-09-26 15:25:58 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
### newrelic_revision
|
2023-01-08 22:34:11 +02:00
|
|
|
|
[Source](https://github.com/deployphp/deployer/blob/master/contrib/newrelic.php#L31)
|
2021-09-26 15:25:58 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-09-12 12:53:42 +02:00
|
|
|
|
```php title="Default value"
|
|
|
|
|
return runLocally('git log -n 1 --format="%h"');
|
|
|
|
|
```
|
2021-09-26 15:25:58 +02:00
|
|
|
|
|
|
|
|
|
|
2023-01-08 22:34:11 +02:00
|
|
|
|
### newrelic_endpoint
|
|
|
|
|
[Source](https://github.com/deployphp/deployer/blob/master/contrib/newrelic.php#L35)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
```php title="Default value"
|
|
|
|
|
'api.newrelic.com'
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
2021-09-26 15:25:58 +02:00
|
|
|
|
|
|
|
|
|
## Tasks
|
|
|
|
|
|
|
|
|
|
### newrelic:notify
|
2023-01-08 22:34:11 +02:00
|
|
|
|
[Source](https://github.com/deployphp/deployer/blob/master/contrib/newrelic.php#L38)
|
2021-09-26 15:25:58 +02:00
|
|
|
|
|
2021-11-08 22:59:39 +01:00
|
|
|
|
Notifies New Relic of deployment.
|
2021-09-26 15:25:58 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|