mirror of
https://github.com/deployphp/deployer.git
synced 2025-02-23 00:32:25 +01:00
* moved newrelic endpoint to config and used it when posting to api * ran bin/docgen for the commit * mentioned the new setting for documentation Co-authored-by: RobertOS <robert.simionescu@gmail.com>
85 lines
1.5 KiB
Markdown
85 lines
1.5 KiB
Markdown
<!-- DO NOT EDIT THIS FILE! -->
|
||
<!-- Instead edit contrib/newrelic.php -->
|
||
<!-- Then run bin/docgen -->
|
||
|
||
# Newrelic Recipe
|
||
|
||
```php
|
||
require 'contrib/newrelic.php';
|
||
```
|
||
|
||
[Source](/contrib/newrelic.php)
|
||
|
||
|
||
|
||
## Configuration
|
||
|
||
- `newrelic_app_id` – newrelic's app id
|
||
- `newrelic_api_key` – newrelic's api key
|
||
- `newrelic_description` – message to send
|
||
- `newrelic_endpoint` – newrelic's REST API endpoint
|
||
|
||
## 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
|
||
[Source](https://github.com/deployphp/deployer/blob/master/contrib/newrelic.php#L23)
|
||
|
||
|
||
:::info Required
|
||
Throws exception if not set.
|
||
:::
|
||
|
||
|
||
|
||
|
||
### newrelic_description
|
||
[Source](https://github.com/deployphp/deployer/blob/master/contrib/newrelic.php#L27)
|
||
|
||
|
||
|
||
```php title="Default value"
|
||
return runLocally('git log -n 1 --format="%an: %s" | tr \'"\' "\'"');
|
||
```
|
||
|
||
|
||
### newrelic_revision
|
||
[Source](https://github.com/deployphp/deployer/blob/master/contrib/newrelic.php#L31)
|
||
|
||
|
||
|
||
```php title="Default value"
|
||
return runLocally('git log -n 1 --format="%h"');
|
||
```
|
||
|
||
|
||
### newrelic_endpoint
|
||
[Source](https://github.com/deployphp/deployer/blob/master/contrib/newrelic.php#L35)
|
||
|
||
|
||
|
||
```php title="Default value"
|
||
'api.newrelic.com'
|
||
```
|
||
|
||
|
||
|
||
## Tasks
|
||
|
||
### newrelic:notify
|
||
[Source](https://github.com/deployphp/deployer/blob/master/contrib/newrelic.php#L38)
|
||
|
||
Notifies New Relic of deployment.
|
||
|
||
|
||
|
||
|