ExtensionAdapter.php in New Relic 2.x
File
src/ExtensionAdapter/ExtensionAdapter.php
View source
<?php
namespace Drupal\new_relic_rpm\ExtensionAdapter;
class ExtensionAdapter implements NewRelicAdapterInterface {
public function setTransactionState($state) {
switch ($state) {
case static::STATE_BACKGROUND:
newrelic_background_job(TRUE);
break;
case static::STATE_IGNORE:
newrelic_ignore_transaction(TRUE);
break;
}
}
public function logException($exception) {
newrelic_notice_error($exception);
}
public function logError($message, $exception = NULL) {
newrelic_notice_error($message, $exception);
}
public function addCustomParameter($key, $value) {
newrelic_add_custom_parameter($key, $value);
}
public function setTransactionName($name) {
newrelic_name_transaction($name);
}
public function recordCustomEvent($name, array $attributes) {
if (function_exists('newrelic_record_custom_event')) {
newrelic_record_custom_event($name, $attributes);
}
}
public function disableAutorum() {
return newrelic_disable_autorum();
}
}