-
Notifications
You must be signed in to change notification settings - Fork 78
Open
Labels
backlogWe hope to fix this feature/bug in the futureWe hope to fix this feature/bug in the futurefeature requestRequest for a new featureRequest for a new feature
Description
Describe the bug
Using Bugsnag with https://github.com/yiisoft/yii2, logged errors are not flushed to Bugsnag with batching enabled.
- Exceptions seem to work, just not logged errors
- If I disable batching (
$bugsnagClient->setBatchSending(false);
By settings some breakpoints, I can see that the order of operations seems off:
\Bugsnag\Shutdown\PhpShutdownStrategy::registerShutdownStrategy
\Bugsnag\Client::flush
(queue is empty)\Bugsnag\Client::notify
(after which, queue has report)
As you can see, flush seems to be getting called before notify, so the reports never get flushed to Bugsnag.
This seems to be because Yii's logger has its own register_shutdown_function
to flush its logs, but is always called last. In this case Bugsnag's shutdown needs to be called after, or no logs exist.
Environment
- Bugsnag version: 3.28
- PHP version: 8.1
- Integration framework version:
- Craft [email protected] ([email protected])
Metadata
Metadata
Assignees
Labels
backlogWe hope to fix this feature/bug in the futureWe hope to fix this feature/bug in the futurefeature requestRequest for a new featureRequest for a new feature