function _new_relic_rpm_deploy in New Relic 7
Send deployments to New Relic's web API.
Parameters
string $user: (optional) User deploying changes.
string $description: (optional) Description of the deployment.
string $changelog: (optional) A list of changes for this deployment.
string $revision: (optional) Revision id of the deployment.
3 calls to _new_relic_rpm_deploy()
- new_relic_rpm_deploy_submit in ./
new_relic_rpm.settings.inc - FormAPI submit callback for the manual deployment creation.
- new_relic_rpm_flush_caches in ./
new_relic_rpm.module - Implements hook_flush_caches().
- new_relic_rpm_module_deploy in ./
new_relic_rpm.module - Log module enable/disable actions as a deploy call to New Relic.
1 string reference to '_new_relic_rpm_deploy'
- new_relic_rpm_drush_command in ./
new_relic_rpm.drush.inc - Implements hook_drush_command().
File
- ./
new_relic_rpm.module, line 425 - Drupal module implementing New Relic.
Code
function _new_relic_rpm_deploy($user = NULL, $description = NULL, $changelog = NULL, $revision = NULL) {
$post_vars['deployment[application_id]'] = ini_get('newrelic.appname');
if (isset($user)) {
$post_vars['deployment[user]'] = $user;
}
if (isset($description)) {
$post_vars['deployment[description]'] = $description;
}
if (isset($changelog)) {
$post_vars['deployment[changelog]'] = $changelog;
}
if (isset($revision)) {
$post_vars['deployment[revision]'] = $revision;
}
$deployments = new_relic_rpm_curl('https://rpm.newrelic.com/deployments.xml', $post_vars);
watchdog('New Relic', 'Action logged as deployment. Log data: <pre>%details</pre>', array(
'%details' => $deployments,
), WATCHDOG_INFO);
}