File tree Expand file tree Collapse file tree 2 files changed +15
-4
lines changed Expand file tree Collapse file tree 2 files changed +15
-4
lines changed Original file line number Diff line number Diff line change 22
33## Unreleased
44
5+ - Track Artisan command invocation in breadcrumb (#232 )
56- Fixed ` sql_bindings ` configuration fallback (#231 )
67- Fixed events generated in queue worker not sending until worker exits (#228 )
78- Add phpDoc methods to the facade for better autocompletion (#226 )
Original file line number Diff line number Diff line change @@ -313,11 +313,21 @@ protected function queueJobProcessingHandler(JobProcessing $event)
313313 */
314314 protected function commandStartingHandler (CommandStarting $ event )
315315 {
316- Integration:: configureScope ( function ( Scope $ scope ) use ( $ event): void {
317- if ( $ event-> command ) {
316+ if ( $ event-> command ) {
317+ Integration:: configureScope ( function ( Scope $ scope ) use ( $ event): void {
318318 $ scope ->setTag ('command ' , $ event ->command );
319- }
320- });
319+ });
320+
321+ Integration::addBreadcrumb (new Breadcrumb (
322+ Breadcrumb::LEVEL_INFO ,
323+ Breadcrumb::TYPE_USER ,
324+ 'artisan.command ' ,
325+ 'Invoked Artisan command: ' . $ event ->command ,
326+ method_exists ($ event ->input , '__toString ' ) ? [
327+ 'input ' => (string )$ event ->input ,
328+ ] : []
329+ ));
330+ }
321331 }
322332
323333 /**
You can’t perform that action at this time.
0 commit comments