Sentry-laravel: ErrorException appears with level info

Created on 25 Jun 2019  路  4Comments  路  Source: getsentry/sentry-laravel

Can you help me understand why a "notice" ends up as an ErrorException with level "info" in my sentry dashboard ?

sentry-notice

I asked for a minimum logging level in my config/logging.php :

        'sentry' => [
            'driver' => 'sentry',
            'level' => 'warning'
        ],

versions:
sentry/sdk 2.0.3
sentry/sentry 2.1.0
sentry/sentry-laravel 1.0.2

question

Most helpful comment

@stayallive ok

It might be usefull to mention that you can add those php options directly in sentry.php in https://docs.sentry.io/platforms/php/laravel

What do you think ?

All 4 comments

Hey @smknstd, I can help understand :)

A ErrorException is create by the Sentry SDK when an PHP error is generated (errors are different from Exceptions).

When you register our SDK we inject a few handlers to catch any errors that occur and also any uncaught/fatal Exceptions.

You added Sentry as a logging driver, however this will not prevent the SDK for listening for errors and uncaught/fatal Exceptions.

If you want to configure the which or if errors are caught you can set the following config key in your sentry.php:

    'error_types' => E_ALL ^ E_NOTICE,

As an example the above excludes only errors with the level notice. You can see all types here.

Because it's "just" a notice it reports it's level as info.

Thanks a lot for your explanation, 100% clear!

It might be usefull to update documentation with config key error_types :)

@smknstd where would you have expected to see it?

It's here: https://docs.sentry.io/platforms/php/#error_types


Edit: We've added to the docs you can use any PHP options in config/sentry.php: https://docs.sentry.io/platforms/php/laravel/#configuration

@stayallive ok

It might be usefull to mention that you can add those php options directly in sentry.php in https://docs.sentry.io/platforms/php/laravel

What do you think ?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

yoyosan picture yoyosan  路  5Comments

IMM9O picture IMM9O  路  5Comments

Dalabad picture Dalabad  路  3Comments

AidasK picture AidasK  路  5Comments

errogaht picture errogaht  路  8Comments