Skip to content

Commit 894506e

Browse files
committed
PHP 5.3 transaction names via closure - fixes #8
1 parent 245783b commit 894506e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Intouch/LaravelNewrelic/LaravelNewrelicServiceProvider.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,16 +72,17 @@ public function provides()
7272
*/
7373
protected function registerNamedTransactions()
7474
{
75+
$me = $this;
7576
$app = $this->app;
7677
$app->after(
77-
function ( $request, $response ) use ( $app )
78+
function ( $request, $response ) use ( $me, $app )
7879
{
7980
if ( true == $app['config']['laravel-newrelic::auto_name_transactions'] )
8081
{
8182
/** @var \Intouch\Newrelic\Newrelic $newrelic */
8283
$newrelic = $app['newrelic'];
8384

84-
$newrelic->nameTransaction( $this->getTransactionName( $request, $response, $app ) );
85+
$newrelic->nameTransaction( $me->getTransactionName( $request, $response, $app ) );
8586
}
8687
}
8788
);

0 commit comments

Comments
 (0)