getsentry / sentry-laravel

The official Laravel SDK for Sentry (sentry.io)
https://sentry.io
MIT License
1.26k stars 188 forks source link

Cron monitoring without DSN set results in error #696

Closed stayallive closed 1 year ago

stayallive commented 1 year ago

Discussed in https://github.com/getsentry/sentry-laravel/discussions/695

Originally posted by **lloricode** May 20, 2023 I have a scheduled command ```php $schedule->command(SomeCommand::class) ->sentryMonitor('point-of-sale-cron-monitoring') ``` When I try to run ` php artisan schedule:list` on my local, it's working fine, but when `SENTRY_LARAVEL_DSN=` in .env is not set it will throw an exception: ``` Method Illuminate\Console\Scheduling\Event::sentryMonitor does not exist. ``` I hope this allow to just ignore when there is no setup for sentry
cleptric commented 1 year ago

Fixed in 3.4.1