diff --git a/src/Sentry/Laravel/EventHandler.php b/src/Sentry/Laravel/EventHandler.php index d7ffe301..06d2714c 100644 --- a/src/Sentry/Laravel/EventHandler.php +++ b/src/Sentry/Laravel/EventHandler.php @@ -294,7 +294,9 @@ protected function queueJobProcessedHandler(JobProcessed $event) protected function commandStartingHandler(CommandStarting $event) { Integration::configureScope(function (Scope $scope) use ($event): void { - $scope->setTag('command', $event->command); + if ($event->command) { + $scope->setTag('command', $event->command); + } }); }