Back to Deployer

Newrelic Recipe

docs/contrib/newrelic.md

8.0.31.5 KB
Original Source
<!-- DO NOT EDIT THIS FILE! --> <!-- Instead edit contrib/newrelic.php --> <!-- Then run bin/docgen -->

Newrelic Recipe

php
require 'contrib/newrelic.php';

Source

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

:::info Required Throws exception if not set. :::

newrelic_description

Source

php
return runLocally('git log -n 1 --format="%an: %s" | tr \'"\' "\'"');

newrelic_revision

Source

php
return runLocally('git log -n 1 --format="%h"');

newrelic_endpoint

Source

php
'api.newrelic.com'

Tasks

newrelic:notify {#newrelic-notify}

Source

Notifies New Relic of deployment.