@@ -248,46 +248,36 @@ function ($This, $scope, $args) {
248248            }
249249        );
250250
251-         $ symfonyCommandsIntegrated
252-         \DDTrace \hook_method (
251+         \DDTrace \trace_method (
253252            'Symfony\Component\Console\Command\Command ' ,
254-             '__construct ' ,
255-             null ,
256-             function  ($ This$ scopeuse  (&$ symfonyCommandsIntegrated$ integration
257-                 if  (isset ($ symfonyCommandsIntegrated$ scope
258-                     return ;
259-                 }
260- 
261-                 $ symfonyCommandsIntegrated$ scopetrue ;
262- 
263-                 \DDTrace \trace_method ($ scope'run ' , [
264-                     /* Commands can evidently call other commands, so allow recursion: 
265-                      * > Console events are only triggered by the main command being executed. 
266-                      * > Commands called by the main command will not trigger any event. 
267-                      * - https://symfony.com/doc/current/components/console/events.html. 
268-                      */ 
269-                     'recurse '  => true ,
270-                     'prehook '  => function  (SpanData $ spanuse  ($ scope$ integration
271-                         if  (\DDTrace \root_span () === $ span
272-                             return  false ;
273-                         }
253+             'run ' ,
254+             [
255+                 /* Commands can evidently call other commands, so allow recursion: 
256+                  * > Console events are only triggered by the main command being executed. 
257+                  * > Commands called by the main command will not trigger any event. 
258+                  * - https://symfony.com/doc/current/components/console/events.html. 
259+                  */ 
260+                 'recurse '  => true ,
261+                 'prehook '  => function  (SpanData $ spanuse  ($ integration
262+                     if  (\DDTrace \root_span () === $ span
263+                         return  false ;
264+                     }
274265
275-                          $ namespace\get_class ($ this 
276-                          if  (strpos ($ namespaceNAME ) !== false ) {
277-                              $ integrationframeworkPrefix  = DrupalIntegration::NAME ;
278-                          } else  {
279-                              $ integrationframeworkPrefix  = SymfonyIntegration::NAME ;
280-                          }
266+                     $ namespace\get_class ($ this 
267+                     if  (strpos ($ namespaceNAME ) !== false ) {
268+                         $ integrationframeworkPrefix  = DrupalIntegration::NAME ;
269+                     } else  {
270+                         $ integrationframeworkPrefix  = SymfonyIntegration::NAME ;
271+                     }
281272
282-                         $ spanname  = 'symfony.console.command.run ' ;
283-                         $ spanresource  = $ this getName () ?: $ spanname ;
284-                         $ spanservice  = \ddtrace_config_app_name ($ integrationframeworkPrefix );
285-                         $ spantype  = Type::CLI ;
286-                         $ spanmeta ['symfony.console.command.class ' ] = $ scope
287-                         $ spanmeta [Tag::COMPONENT ] = SymfonyIntegration::NAME ;
288-                     }]
289-                 );
290-             }
273+                     $ spanname  = 'symfony.console.command.run ' ;
274+                     $ spanresource  = $ this getName () ?: $ spanname ;
275+                     $ spanservice  = \ddtrace_config_app_name ($ integrationframeworkPrefix );
276+                     $ spantype  = Type::CLI ;
277+                     $ spanmeta ['symfony.console.command.class ' ] = \get_class ($ this 
278+                     $ spanmeta [Tag::COMPONENT ] = SymfonyIntegration::NAME ;
279+                 }
280+             ]
291281        );
292282
293283        \DDTrace \hook_method (
0 commit comments