You are here

interface NewRelicAdapterInterface in New Relic 8

Same name and namespace in other branches
  1. 2.x src/ExtensionAdapter/NewRelicAdapterInterface.php \Drupal\new_relic_rpm\ExtensionAdapter\NewRelicAdapterInterface
  2. 2.0.x src/ExtensionAdapter/NewRelicAdapterInterface.php \Drupal\new_relic_rpm\ExtensionAdapter\NewRelicAdapterInterface

New relic API adapter interface.

Hierarchy

Expanded class hierarchy of NewRelicAdapterInterface

All classes that implement NewRelicAdapterInterface

5 files declare their use of NewRelicAdapterInterface
ExceptionSubscriber.php in src/EventSubscriber/ExceptionSubscriber.php
NewRelicConfigSubscriber.php in src/EventSubscriber/NewRelicConfigSubscriber.php
NewRelicLogger.php in src/Logger/NewRelicLogger.php
NewRelicLoggerTest.php in tests/src/Unit/Logger/NewRelicLoggerTest.php
NewRelicRequestSubscriber.php in src/EventSubscriber/NewRelicRequestSubscriber.php
1 string reference to 'NewRelicAdapterInterface'
new_relic_rpm.services.yml in ./new_relic_rpm.services.yml
new_relic_rpm.services.yml
1 service uses NewRelicAdapterInterface
new_relic_rpm.adapter in ./new_relic_rpm.services.yml
Drupal\new_relic_rpm\ExtensionAdapter\NewRelicAdapterInterface

File

src/ExtensionAdapter/NewRelicAdapterInterface.php, line 8

Namespace

Drupal\new_relic_rpm\ExtensionAdapter
View source
interface NewRelicAdapterInterface {
  const STATE_IGNORE = 'ignore';
  const STATE_BACKGROUND = 'bg';

  /**
   * Set the new relic transaction state.
   *
   * @param string $state
   *   One of the state constants.
   */
  public function setTransactionState($state);

  /**
   * Logs an exception.
   *
   * @param \Exception $e
   *   The exception.
   */
  public function logException(\Exception $e);

  /**
   * Logs an error message.
   *
   * @param string $message
   *   The error message.
   */
  public function logError($message);

  /**
   * Adds a custom parameter.
   *
   * @param string $key
   *   Key that identifies the parameter.
   * @param string $value
   *   Value for the parameter.
   */
  public function addCustomParameter($key, $value);

  /**
   * Set the transaction name.
   *
   * @param string $name
   *   Name for this transaction.
   */
  public function setTransactionName($name);

  /**
   * Records a custom event for insights.
   *
   * @param string $name
   *   Name of the event.
   * @param array $attributes
   *   List of attributees for the event. Only scalar types are allowed.
   */
  public function recordCustomEvent($name, array $attributes);

  /**
   * Disable automatic injection of the New Relic Browser snippet.
   *
   * @return mixed
   *   TRUE if called within newrelic transaction. Otherwise NULL.
   */
  public function disableAutorum();

}

Members

Namesort descending Modifiers Type Description Overrides
NewRelicAdapterInterface::addCustomParameter public function Adds a custom parameter. 2
NewRelicAdapterInterface::disableAutorum public function Disable automatic injection of the New Relic Browser snippet. 2
NewRelicAdapterInterface::logError public function Logs an error message. 2
NewRelicAdapterInterface::logException public function Logs an exception. 2
NewRelicAdapterInterface::recordCustomEvent public function Records a custom event for insights. 2
NewRelicAdapterInterface::setTransactionName public function Set the transaction name. 2
NewRelicAdapterInterface::setTransactionState public function Set the new relic transaction state. 2
NewRelicAdapterInterface::STATE_BACKGROUND constant
NewRelicAdapterInterface::STATE_IGNORE constant