@@ -535,7 +535,7 @@ enum SetSubcmd {
535535    } , 
536536} 
537537
538- #[ tracing :: instrument ( level  = "trace " ,  fields( args = format!( "{:?}" ,  process( ) . args_os( ) . collect:: <Vec <_>>( ) ) ) ) ]  
538+ #[ cfg_attr ( feature  = "otel " ,  tracing :: instrument ( fields( args = format!( "{:?}" ,  process( ) . args_os( ) . collect:: <Vec <_>>( ) ) ) ) ) ]  
539539pub  async  fn  main ( current_dir :  PathBuf )  -> Result < utils:: ExitCode >  { 
540540    self_update:: cleanup_self_updater ( ) ?; 
541541
@@ -550,7 +550,7 @@ pub async fn main(current_dir: PathBuf) -> Result<utils::ExitCode> {
550550            write ! ( process( ) . stdout( ) . lock( ) ,  "{err}" ) ?; 
551551            info ! ( "This is the version for the rustup toolchain manager, not the rustc compiler." ) ; 
552552
553-             #[ tracing :: instrument ( level  = "trace"  ) ]  
553+             #[ cfg_attr ( feature  = "otel"  ,  tracing :: instrument ) ]  
554554            async  fn  rustc_version ( 
555555                current_dir :  PathBuf , 
556556            )  -> std:: result:: Result < String ,  Box < dyn  std:: error:: Error > >  { 
@@ -938,7 +938,7 @@ async fn which(
938938    Ok ( utils:: ExitCode ( 0 ) ) 
939939} 
940940
941- #[ tracing :: instrument ( level  = "trace " ,  skip_all) ]  
941+ #[ cfg_attr ( feature  = "otel " ,  tracing :: instrument ( skip_all) ) ]  
942942fn  show ( cfg :  & Cfg ,  verbose :  bool )  -> Result < utils:: ExitCode >  { 
943943    common:: warn_if_host_is_emulated ( ) ; 
944944
@@ -1075,7 +1075,7 @@ fn show(cfg: &Cfg, verbose: bool) -> Result<utils::ExitCode> {
10751075    Ok ( utils:: ExitCode ( 0 ) ) 
10761076} 
10771077
1078- #[ tracing :: instrument ( level  = "trace " ,  skip_all) ]  
1078+ #[ cfg_attr ( feature  = "otel " ,  tracing :: instrument ( skip_all) ) ]  
10791079fn  show_active_toolchain ( cfg :  & Cfg ,  verbose :  bool )  -> Result < utils:: ExitCode >  { 
10801080    match  cfg. find_active_toolchain ( ) ? { 
10811081        Some ( ( toolchain_name,  reason) )  => { 
@@ -1099,7 +1099,7 @@ fn show_active_toolchain(cfg: &Cfg, verbose: bool) -> Result<utils::ExitCode> {
10991099    Ok ( utils:: ExitCode ( 0 ) ) 
11001100} 
11011101
1102- #[ tracing :: instrument ( level  = "trace " ,  skip_all) ]  
1102+ #[ cfg_attr ( feature  = "otel " ,  tracing :: instrument ( skip_all) ) ]  
11031103fn  show_rustup_home ( cfg :  & Cfg )  -> Result < utils:: ExitCode >  { 
11041104    writeln ! ( process( ) . stdout( ) . lock( ) ,  "{}" ,  cfg. rustup_dir. display( ) ) ?; 
11051105    Ok ( utils:: ExitCode ( 0 ) ) 
0 commit comments