@@ -42,6 +42,7 @@ impl TaskGraphLoader for LazyTaskGraph<'_> {
4242 async fn load_task_graph (
4343 & mut self ,
4444 ) -> Result < & vite_task_graph:: IndexedTaskGraph , TaskGraphLoadError > {
45+ let _span = tracing:: debug_span!( "load_task_graph" ) . entered ( ) ;
4546 Ok ( match self {
4647 Self :: Uninitialized { workspace_root, config_loader } => {
4748 let graph = IndexedTaskGraph :: load ( workspace_root, * config_loader) . await ?;
@@ -159,6 +160,7 @@ impl<'a> Session<'a> {
159160 ///
160161 /// Returns an error if the current directory cannot be determined or
161162 /// if workspace initialization fails.
163+ #[ tracing:: instrument( level = "debug" , skip_all) ]
162164 pub fn init ( callbacks : SessionCallbacks < ' a > ) -> anyhow:: Result < Self > {
163165 let envs = std:: env:: vars_os ( )
164166 . map ( |( k, v) | ( Arc :: < OsStr > :: from ( k. as_os_str ( ) ) , Arc :: < OsStr > :: from ( v. as_os_str ( ) ) ) )
@@ -171,6 +173,7 @@ impl<'a> Session<'a> {
171173 /// # Errors
172174 ///
173175 /// Returns an error if the task graph cannot be loaded from the workspace configuration.
176+ #[ tracing:: instrument( level = "debug" , skip_all) ]
174177 #[ expect(
175178 clippy:: future_not_send,
176179 reason = "session is single-threaded, futures do not need to be Send"
@@ -186,6 +189,7 @@ impl<'a> Session<'a> {
186189 /// # Errors
187190 ///
188191 /// Returns an error if workspace root cannot be found or PATH env cannot be prepended.
192+ #[ tracing:: instrument( level = "debug" , skip_all) ]
189193 #[ expect(
190194 clippy:: needless_pass_by_value,
191195 reason = "cwd is an Arc that gets cloned internally, pass by value is intentional"
@@ -222,6 +226,7 @@ impl<'a> Session<'a> {
222226 /// # Errors
223227 ///
224228 /// Returns an error if planning or execution fails.
229+ #[ tracing:: instrument( level = "debug" , skip_all) ]
225230 #[ expect(
226231 clippy:: future_not_send,
227232 reason = "session is single-threaded, futures do not need to be Send"
@@ -500,6 +505,7 @@ impl<'a> Session<'a> {
500505 /// # Errors
501506 ///
502507 /// Returns an error if planning or execution of the synthetic command fails.
508+ #[ tracing:: instrument( level = "debug" , skip_all) ]
503509 #[ expect(
504510 clippy:: future_not_send,
505511 reason = "session is single-threaded, futures do not need to be Send"
@@ -531,14 +537,14 @@ impl<'a> Session<'a> {
531537 reporter:: PlainReporter :: new ( silent_if_cache_hit, Box :: new ( tokio:: io:: stdout ( ) ) ) ;
532538
533539 // Execute the spawn directly using the free function, bypassing the graph pipeline
534- match execute:: execute_spawn (
540+ let outcome = execute:: execute_spawn (
535541 Box :: new ( plain_reporter) ,
536542 & spawn_execution,
537543 cache,
538544 & self . workspace_path ,
539545 )
540- . await
541- {
546+ . await ;
547+ match outcome {
542548 // Cache hit — no process was spawned, success
543549 execute:: SpawnOutcome :: CacheHit => Ok ( ExitStatus :: SUCCESS ) ,
544550 // Process ran successfully
@@ -562,6 +568,7 @@ impl<'a> Session<'a> {
562568 /// # Errors
563569 ///
564570 /// Returns an error if the plan request cannot be parsed or if planning fails.
571+ #[ tracing:: instrument( level = "debug" , skip_all) ]
565572 #[ expect(
566573 clippy:: future_not_send,
567574 reason = "session is single-threaded, futures do not need to be Send"
@@ -575,6 +582,7 @@ impl<'a> Session<'a> {
575582 }
576583
577584 /// Internal: plans execution from a resolved run command.
585+ #[ tracing:: instrument( level = "debug" , skip_all) ]
578586 #[ expect(
579587 clippy:: future_not_send,
580588 reason = "session is single-threaded, futures do not need to be Send"
0 commit comments