2017 © Pedro Peláez
 

library sentry-laravel

Laravel integration for Sentry (https://sentry.io)

image

sentry/sentry-laravel

Laravel integration for Sentry (https://sentry.io)

  • Wednesday, July 18, 2018
  • by zeeg
  • Repository
  • 14 Watchers
  • 346 Stars
  • 2,337,575 Installations
  • PHP
  • 27 Dependents
  • 0 Suggesters
  • 67 Forks
  • 9 Open issues
  • 27 Versions
  • 16 % Grown

The README.md

Bad software is everywhere, and we're tired of it. Sentry is on a mission to help developers write better software faster, so we can get back to enjoying technology. If you want to join us Check out our open positions, (*1)

Official Sentry SDK for Laravel

CI Latest Stable Version License Total Downloads Monthly Downloads Discord, (*2)

This is the official Laravel SDK for Sentry., (*3)

Getting Started

The installation steps below work on version 11.x of the Laravel framework., (*4)

For older Laravel versions and Lumen see:, (*5)

Install

Install the sentry/sentry-laravel package:, (*6)

composer require sentry/sentry-laravel

Enable capturing unhandled exception to report to Sentry by making the following change to your bootstrap/app.php:, (*7)

```php {filename:bootstrap/app.php} <?php, (*8)

use Illuminate\Foundation\Application; use Illuminate\Foundation\Configuration\Exceptions; use Illuminate\Foundation\Configuration\Middleware; use Sentry\Laravel\Integration;, (*9)

return Application::configure(basePath: dirname(DIR)) ->withRouting( web: DIR.'/../routes/web.php', commands: DIR.'/../routes/console.php', health: '/up', ) ->withMiddleware(function (Middleware $middleware) { // }) ->withExceptions(function (Exceptions $exceptions) { Integration::handles($exceptions); })->create();, (*10)


> Alternatively, you can configure Sentry as a [Laravel Log Channel](https://docs.sentry.io/platforms/php/guides/laravel/usage/#log-channels), allowing you to capture `info` and `debug` logs as well. ### Configure Configure the Sentry DSN with this command: ```shell php artisan sentry:publish --dsn=___PUBLIC_DSN___

It creates the config file (config/sentry.php) and adds the DSN to your .env file., (*11)

```shell {filename:.env} SENTRY_LARAVEL_DSN=PUBLIC_DSN, (*12)


### Usage ```php use function Sentry\captureException; try { $this->functionThatMayFail(); } catch (\Throwable $exception) { captureException($exception); }

To learn more about how to use the SDK refer to our docs., (*13)

Laravel Version Compatibility

The Laravel and Lumen versions listed below are all currently supported:, (*14)

  • Laravel >= 11.x.x on PHP >= 8.2 is supported starting from 4.3.0
  • Laravel >= 10.x.x on PHP >= 8.1 is supported starting from 3.2.0
  • Laravel >= 9.x.x on PHP >= 8.0 is supported starting from 2.11.0
  • Laravel >= 8.x.x on PHP >= 7.3 is supported starting from 1.9.0
  • Laravel >= 7.x.x on PHP >= 7.2 is supported starting from 1.7.0
  • Laravel >= 6.x.x on PHP >= 7.2 is supported starting from 1.2.0

Please note that starting with version >= 2.0.0 we require PHP Version >= 7.2 because we are using our new PHP SDK underneath., (*15)

The Laravel versions listed below were supported in previous versions of the Sentry SDK for Laravel:, (*16)

  • Laravel <= 4.2.x is supported until 0.8.x
  • Laravel <= 5.7.x on PHP <= 7.0 is supported until 0.11.x
  • Laravel >= 5.x.x on PHP >= 7.1 is supported until 2.14.x

Contributing to the SDK

Please refer to CONTRIBUTING.md., (*17)

Thanks to all the people who contributed so far!

, (*18)

Getting Help/Support

If you need help setting up or configuring the Laravel SDK (or anything else in the Sentry universe) please head over to the Sentry Community on Discord. There is a ton of great people in our Discord community ready to help you!, (*19)

Resources

  • Documentation
  • Discord
  • Stack Overflow
  • Twitter Follow

License

Licensed under the MIT license, see LICENSE., (*20)

The Versions

18/07 2018

dev-releases/0.9.x

dev-releases/0.9.x https://sentry.io

Laravel integration for Sentry (https://sentry.io)

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

laravel logging errors sentry

18/07 2018

0.9.2

0.9.2.0 https://sentry.io

Laravel integration for Sentry (https://sentry.io)

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

laravel logging errors sentry

18/07 2018

dev-master

9999999-dev https://sentry.io

Laravel integration for Sentry (https://sentry.io)

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

laravel logging errors sentry

06/07 2018

0.9.1

0.9.1.0 https://sentry.io

Laravel integration for Sentry (https://sentry.io)

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

laravel logging errors sentry

03/05 2018

0.9.0

0.9.0.0 https://sentry.io

Laravel integration for Sentry (https://sentry.io)

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

laravel logging errors sentry

30/04 2018

dev-fix/user_context

dev-fix/user_context https://sentry.io

Laravel integration for Sentry (https://sentry.io)

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

laravel logging errors sentry

26/04 2018

dev-readme-updates

dev-readme-updates https://sentry.io

Laravel integration for Sentry (https://sentry.io)

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

laravel logging errors sentry

26/04 2018

dev-update-env-var-name

dev-update-env-var-name https://sentry.io

Laravel integration for Sentry (https://sentry.io)

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

laravel logging errors sentry

12/03 2018

dev-remove-laravel-4-support

dev-remove-laravel-4-support https://sentry.io

Laravel integration for Sentry (https://sentry.io)

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

laravel logging errors sentry

24/11 2017

dev-add-sentry-conflict-documentation

dev-add-sentry-conflict-documentation https://sentry.io

Laravel integration for Sentry (https://sentry.io)

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

laravel logging errors sentry

31/08 2017

dev-laravel-4-x

dev-laravel-4-x https://sentry.io

Laravel integration for Sentry (https://sentry.io)

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

laravel logging errors sentry

11/08 2017

dev-releases/0.8.x

dev-releases/0.8.x https://sentry.io

Laravel integration for Sentry (https://sentry.io)

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

laravel logging errors sentry

11/08 2017

0.8.0

0.8.0.0 https://sentry.io

Laravel integration for Sentry (https://sentry.io)

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

laravel logging errors sentry

21/04 2017

dev-releases/0.7.x

dev-releases/0.7.x https://sentry.io

Laravel integration for Sentry (https://sentry.io)

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

laravel logging errors sentry

21/04 2017

0.7.0

0.7.0.0 https://sentry.io

Laravel integration for Sentry (https://sentry.io)

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

laravel logging errors sentry

17/03 2017

dev-releases/0.4.x

dev-releases/0.4.x http://getsentry.com

Laravel integration for Sentry (http://getsentry.com)

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

laravel logging errors sentry

09/02 2017

dev-releases/0.6.x

dev-releases/0.6.x https://sentry.io

Laravel integration for Sentry (https://sentry.io)

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

laravel logging errors sentry

09/02 2017

0.6.1

0.6.1.0 https://sentry.io

Laravel integration for Sentry (https://sentry.io)

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

laravel logging errors sentry

24/01 2017

0.6.0

0.6.0.0 https://sentry.io

Laravel integration for Sentry (https://sentry.io)

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

laravel logging errors sentry

09/12 2016

dev-releases/0.5.x

dev-releases/0.5.x https://sentry.io

Laravel integration for Sentry (https://sentry.io)

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

laravel logging errors sentry

09/12 2016

0.5.0

0.5.0.0 https://sentry.io

Laravel integration for Sentry (https://sentry.io)

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

laravel logging errors sentry

30/09 2016

0.4.1

0.4.1.0 http://getsentry.com

Laravel integration for Sentry (http://getsentry.com)

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

laravel logging errors sentry

30/09 2016

0.4.0

0.4.0.0 http://getsentry.com

Laravel integration for Sentry (http://getsentry.com)

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

laravel logging errors sentry

06/05 2016

0.3.0

0.3.0.0 http://getsentry.com

Laravel integration for Sentry (http://getsentry.com)

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

laravel logging errors sentry

04/05 2016

0.2.0

0.2.0.0 http://getsentry.com

Laravel integration for Sentry (http://getsentry.com)

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

laravel logging errors sentry

27/04 2016

0.1.1

0.1.1.0 http://getsentry.com

Laravel integration for Sentry (http://getsentry.com)

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

laravel logging errors sentry

27/04 2016

0.1.0

0.1.0.0 http://getsentry.com

Laravel integration for Sentry (http://getsentry.com)

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

laravel logging errors sentry