New Relic PHP Agent Now Includes Framework Support for Laravel 4

laravelIf you’re programming in PHP, there’s a good chance you’re using the Laravel web framework. Laravel is the most starred PHP framework on GitHub, and that’s one of the reasons why we’re pleased to announce that the New Relic PHP agent version 4.6 now contains built-in support for Laravel 4.

How does it work?

The latest New Relic PHP agent provides descriptive transaction names by pulling this information from Laravel’s “Illuminate” dispatcher. We will now name a transaction based on the router’s name, or if that is unknown, based on the router’s action. In the unlikely event that both of those are unknown, then the transaction name will be based on the request’s method (such as GET or POST).

We don’t use the actual URL to name the transaction because that leads to an unwieldy amount of pointlessly different transaction names, rather than meaningful groupings in the New Relic user interface.

We are grateful to Patrick Leckey at In-Touch Insight Systems for helping us navigate through Laravel and come up with transaction names; our mechanisms follow directly from what Patrick has done with his Laravel extension.

If you’re using the In-Touch Insight extension and do not need custom transaction names, then you can disable that extension. If you do need custom transaction names, just leave it enabled and we’ll do the right thing. (Note: you’ll see a log message warning you of the overlapping implementations.)

We’d love to hear from you about your customizable naming scheme, so that we can further improve the New Relic profiler for all Laravel users.

rrh@newrelic.com'

View posts by .

Interested in writing for New Relic Blog? Send us a pitch!