Skip to content

Commit

Permalink
Merge pull request #10 from danwall/bug/transaction-name-2
Browse files Browse the repository at this point in the history
PHP 5.3 transaction names via closure - fixes #8
  • Loading branch information
pleckey committed Jan 13, 2014
2 parents 245783b + 894506e commit 578a69a
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,16 +72,17 @@ public function provides()
*/
protected function registerNamedTransactions()
{
$me = $this;
$app = $this->app;
$app->after(
function ( $request, $response ) use ( $app )
function ( $request, $response ) use ( $me, $app )
{
if ( true == $app['config']['laravel-newrelic::auto_name_transactions'] )
{
/** @var \Intouch\Newrelic\Newrelic $newrelic */
$newrelic = $app['newrelic'];

$newrelic->nameTransaction( $this->getTransactionName( $request, $response, $app ) );
$newrelic->nameTransaction( $me->getTransactionName( $request, $response, $app ) );
}
}
);
Expand Down

0 comments on commit 578a69a

Please sign in to comment.