You are here

public function ExtensionAdapter::setTransactionState in New Relic 8

Same name and namespace in other branches
  1. 2.x src/ExtensionAdapter/ExtensionAdapter.php \Drupal\new_relic_rpm\ExtensionAdapter\ExtensionAdapter::setTransactionState()
  2. 2.0.x src/ExtensionAdapter/ExtensionAdapter.php \Drupal\new_relic_rpm\ExtensionAdapter\ExtensionAdapter::setTransactionState()

Set the new relic transaction state.

Parameters

string $state: One of the state constants.

Overrides NewRelicAdapterInterface::setTransactionState

File

src/ExtensionAdapter/ExtensionAdapter.php, line 13

Class

ExtensionAdapter
Default new relic adapter.

Namespace

Drupal\new_relic_rpm\ExtensionAdapter

Code

public function setTransactionState($state) {
  switch ($state) {
    case static::STATE_BACKGROUND:
      newrelic_background_job(TRUE);
      break;
    case static::STATE_IGNORE:
      newrelic_ignore_transaction(TRUE);
      break;
  }
}