Revision: Thu, 25 May 2023 17:20:16 GMT
v2.9 – outdated
This version of the documentation is outdated. Consider upgrading your project to Spiral Framework 3.7
Edit this page

Extensions - Sentry

You can automatically send the exceptions to the Sentry.

Installation

To install the extension:

composer require spiral/sentry-bridge

Activate the bootloader Spiral\Sentry\Bootloader\SentryBootloader:

php
protected const LOAD = [
    // ...
    Spiral\Sentry\Bootloader\SentryBootloader::class,
    // ...
];

Note
Remove default Spiral\Bootloader\SnapshotsBootloader.

The component will look at SENTRY_DSN env value.

Additional Data

To expose current application logs, PSR-7 request state, etc. enable additional debug extensions:

php
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,   
];