You can automatically send the exceptions to the Sentry.
To install the extension:
composer require spiral/sentry-bridge
Activate the bootloader Spiral\Sentry\Bootloader\SentryBootloader
:
protected const LOAD = [
// ...
Spiral\Sentry\Bootloader\SentryBootloader::class,
// ...
];
Note
Remove defaultSpiral\Bootloader\SnapshotsBootloader
.
The component will look at SENTRY_DSN
env value.
To expose current application logs, PSR-7 request state, etc. enable additional debug extensions:
protected const LOAD = [
// ...
Spiral\Sentry\Bootloader\SentryBootloader::class,
// ...
// at the end of the chain
Spiral\Bootloader\DebugBootloader::class,
Spiral\Bootloader\Debug\LogCollectorBootloader::class,
Spiral\Bootloader\Debug\HttpCollectorBootloader::class,
];