We’re trying to use the monolog enricher at https://github.com/newrelic/newrelic-monolog-logenricher-php to log from a laravel worker, running as a daemon. We based our code on this example: https://docs.newrelic.com/docs/logs/enable-log-management-new-relic/logs-context-php/configure-logs-context-php
Because our workers run as a daemon, we didn’t use the buffered handler and instead configured it (we think!) to make a curl call for every log entry. But not only do the logs not show up in the APM, they don’t even appear elsewhere in the log stack - even if called via a ‘tinker’ command.
Are there any gotchas with this? Has anyone got this working and if so, would you be willing to share pointers or even some code? In theory it should be as simple as registering an additional Monolog source.
For reference, this is Laravel 7.