PHP Agent 4.21.0.97

Released on: 
Thursday, April 30, 2015 - 14:17
End of Life

The end-of-life date for this agent version is July 29, 2019. To update to the latest agent version, see Update the agent. For more information, see End-of-life policy.

New Features

Zend Framework 2 transaction naming support

Support has been added for naming transactions automatically based on ZF2 route names. Transaction naming will work with routes set in module.config.php, or anything else using the setMatchedRouteName method of Zend\Mvc\Router\RouteMatch (or the same methods of the corresponding HTTP and Console routers).

For example:

'router' => array( 'routes' => array( 'route1' => array( ... ) 'route' => '/foo[/:bar][/:baz]', 'constraints' => array( ... ), 'defaults' => array( ... 'route2' => array( ... )

Anything the router matches to route1 will be named route1 regardless of URL, parameters or controller. 404 errors and similar will be named "unknown".

Silex transaction naming support

Support has been added for naming transactions automatically based on Silex controller names. If a route name has been set using the Controller::bind() method, then that will be used, otherwise the default controller name generated by Silex will be used instead.

For example:

// This will be named with the autogenerated "GET_hello_name". $app->get('/hello/{name}', function ($name) { ... });

// This will be named "hello", as bound. $app->get('/hello/{name}', function ($name) { ... })->bind('hello');

Automatic transaction naming will work on all Silex 1.x versions provided the default kernel service has not been replaced with an object of a type other than Symfony\Component\HttpKernel\HttpKernel. If the kernel service has been replaced with something else, you will need to continue to use the newrelic_name_transaction function to name your transactions.

End of Life Notices

  • memcacheDuration attributes have been removed.

    A bug in version 4.19 of the PHP agent removed support for memcacheDuration attributes in Transaction events. We have decided not to restore this functionality, as these durations are now accounted for in databaseDuration attribute values.

Bug Fixes

  • databaseDuration attributes have been restored.

    A bug in versions 4.19 and 4.20 of the PHP agent resulted in databaseDuration attributes no longer being attached to Transaction events. These have been restored, with one change: they now also include time spent in Memcached operations, as these are now unified with other datastores in New Relic APM.

  • Fix application name rollup ordering issue.

    When using application rollup names, the agent had the restriction that any name could only appear as the first rollup name once, which prevented the simultaneous connection of a;b and a;c. This restriction has been removed.