Your data. Anywhere you go.

New Relic for iOS or Android


Download on the App Store    Android App on Google play


New Relic Insights App for iOS


Download on the App Store


Learn more

Close icon

PHP Agent (4.19.0) Disabled 3rd Party Service Provider Incorrectly


#1

Hello,

When using the Intouch\LaravelNewRelic SP, the NewRelic PHP Agent automatically disables this provider if no name_provider config variable is set. As the author of the package I’m not a fan of that behaviour, but hey … it is what it is and I’ll leave that alone.

Problem is the way Laravel 5 loads its config has changed, and so even if someone does decide to use this package and does set a name_provider, it still blocks the service from loading:

warning: The 3rd party service provider Intouch\LaravelNewrelic\LaravelNewrelicServiceProvider has been loaded but no name_provider is used, so the LaravelNewrelicServiceProvider will be disabled, and the built-in New Relic Laravel framework handler will be used instead.

… when my app config has the following:

'name_provider' => function ( $request, $response, $app ) {
 	return $app['router']->currentRouteAction()
    		?: $request->getMethod() . ' ' . $request->getPathInfo();
 },

There is also a typo in the error message, when using Laravel 5:

warning: We recommend that you disable the Intouch\LaravelNewrelic\LaravelNewrelicServiceProvider from your Laravel application, as for example commenting it out of the providers array in app/config/app.php

… should be …

warning: We recommend that you disable the Intouch\LaravelNewrelic\LaravelNewrelicServiceProvider from your Laravel application, as for example commenting it out of the providers array in config/app.php

… as the config location has also changed in Laravel 5.

I’m not going to ask you folks to stop trying to force developers onto your native provider, but it really shouldn’t completely stop them from making an application decision to use another provider if they should choose (which with this behaviour and improper support for Laravel 5, it does now).


Laravel queue worker sleep affecting apdex score
#2

Hey @pleckey, thanks for bringing this to our attention. I’ve gone ahead and opened a ticket regarding this issue to investigate things further. You should receive an email shortly.


#3

We’ve removed the code that disabled the Intouch Laravel service provider in version 4.20 of the PHP agent, which we’ve just released this afternoon.

This was a misguided attempt to fix a transaction naming issue on our end, but we shouldn’t have handled it by interfering with userland code, and we’re sorry for the inconvenience caused. We’ll do better in future!