Exemplo n.º 1
0
 /**
  * @param Request  $request
  * @param Response $response
  */
 public function terminate(Request $request, Response $response)
 {
     $this->newRelic->endOfTransaction();
     if ($this->app instanceof TerminableInterface) {
         $this->app->terminate($request, $response);
     }
 }
 public static function trackTransaction()
 {
     eZExecution::addCleanupHandler(function () {
         $newrelic = new Newrelic(true);
         $newrelic->nameTransaction(self::buildCurrentTransactionName());
     });
 }
Exemplo n.º 3
0
 public function testStartTransaction()
 {
     $name = 'foo';
     $licence = 'bar9000';
     $result = true;
     $handler = $this->getHandlerSpy('newrelic_start_transaction', array($name, $licence), $result);
     $agent = new Newrelic(false, $handler);
     $this->assertSame($result, $agent->startTransaction($name, $licence));
 }
Exemplo n.º 4
0
 /**
  * Adds the three parameter strings to collected browser traces. All three parameters are required, but may be empty
  * strings. For more information please see the section on
  * {@link https://newrelic.com/docs/features/browser-traces browser traces}.
  *
  * @param string $user
  * @param string $account
  * @param string $product
  * @return mixed 
  * @static 
  */
 public static function setUserAttributes($user = '', $account = '', $product = '')
 {
     return \Intouch\Newrelic\Newrelic::setUserAttributes($user, $account, $product);
 }