3
votes

I noticed that the queued jobs do not appear in new relic as transactions of any kind.

After digging for a bit I found that if I run my artisan queue workers "straight" they do appear just fine but if I run them as daemons (That's what I have set for my artisan queue:work commands in supervisord config) they do not.

Why does it work that way? Is there anything that can be done about it?

I wanna keep them with --daemon set to avoid framework bootstrapping for every single job. However being able to see what's going on in new relic is important as well.

Scheduled commands and regular http requests seem to be tracked just fine.

I'm running Laravel 5.2 on several forge servers with both php 5.6 and 7.0.

Thank you

1

1 Answers

3
votes

New Relic added out-of-the-box instrumentation support for Laravel Queues as an experimental feature in version 6.6.0. Check if your agent version is at least 6.6.0 and then add this property to your newrelic.ini:

newrelic.feature_flag=laravel_queue

For more info, check out the release notes: https://docs.newrelic.com/docs/release-notes/agent-release-notes/php-release-notes/php-agent-660169