scout-apm-php icon indicating copy to clipboard operation
scout-apm-php copied to clipboard

Background jobs not showing up from custom instrumentation

Open dlanderson opened this issue 4 years ago • 1 comments

User reporting issue getting background jobs recorded.

  • I opened a Background transaction within one of our laravel commands, such as:
        return ScoutApm::backgroundTransaction($this->name, function() {
            return $this->laravel->call([$this, 'handle']);
        });
  • The handle function here called dynamically runs properly.
  • Later on, within the handle function, I declared a custom instrumentation as explained in the doc.
        ScoutApm::instrument("DataImport", "InMap.prepareData", function ($span) {
            $span->tag("instanceId", $this->settings['agencyId']);
            $this->prepareData();
        });
  • The prepareData function runs properly but we are not able to see anything in the Scout Web UI

The app is reporting web transactions, so it seems like the core agent is running.

dlanderson avatar Mar 04 '20 01:03 dlanderson

@dlanderson has the customer been able to try again with a scout-apm-php version 4.1.0 or above to produce some logs please?

asgrim avatar Mar 18 '20 10:03 asgrim

I suspect this is related to #255, so closing as duplicate.

asgrim avatar Aug 04 '23 04:08 asgrim