/** * @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 function testEndOfTransaction() { $handler = $this->getHandlerSpy('newrelic_end_of_transaction', array()); $agent = new Newrelic(false, $handler); $this->assertNull($agent->endOfTransaction()); }
/** * Stop recording the web transaction immediately. Usually used when a page is done with all computation and is * about to stream data (file download, audio or video streaming etc) and you don't want the time taken to stream to * be counted as part of the transaction. This is especially relevant when the time taken to complete the operation * is completely outside the bounds of your application. For example, a user on a very slow connection may take a * very long time to download even small files, and you wouldn't want that download time to skew the real * transaction time. * * @return mixed * @static */ public static function endOfTransaction() { return \Intouch\Newrelic\Newrelic::endOfTransaction(); }