@@ -306,14 +306,14 @@ impl<'a> DistributableToolchain<'a> {
306
306
}
307
307
}
308
308
309
- #[ tracing :: instrument ( level = "trace " , skip_all) ]
309
+ #[ cfg_attr ( feature = "otel " , tracing :: instrument ( skip_all) ) ]
310
310
pub ( crate ) fn get_manifestation ( & self ) -> anyhow:: Result < Manifestation > {
311
311
let prefix = InstallPrefix :: from ( self . toolchain . path ( ) ) ;
312
312
Manifestation :: open ( prefix, self . desc . target . clone ( ) )
313
313
}
314
314
315
315
/// Get the manifest associated with this distribution
316
- #[ tracing :: instrument ( level = "trace " , skip_all) ]
316
+ #[ cfg_attr ( feature = "otel " , tracing :: instrument ( skip_all) ) ]
317
317
pub ( crate ) fn get_manifest ( & self ) -> anyhow:: Result < Manifest > {
318
318
self . get_manifestation ( ) ?
319
319
. load_manifest ( )
@@ -329,7 +329,7 @@ impl<'a> DistributableToolchain<'a> {
329
329
InstallPrefix :: from ( self . toolchain . path ( ) . to_owned ( ) ) . guess_v1_manifest ( )
330
330
}
331
331
332
- #[ tracing :: instrument ( level = "trace " , err, skip_all) ]
332
+ #[ cfg_attr ( feature = "otel " , tracing :: instrument ( err, skip_all) ) ]
333
333
pub ( crate ) async fn install (
334
334
cfg : & ' a Cfg ,
335
335
desc : & ' _ ToolchainDesc ,
@@ -359,7 +359,7 @@ impl<'a> DistributableToolchain<'a> {
359
359
Ok ( ( status, Self :: new ( cfg, desc. clone ( ) ) ?) )
360
360
}
361
361
362
- #[ tracing :: instrument ( level = "trace " , err, skip_all) ]
362
+ #[ cfg_attr ( feature = "otel " , tracing :: instrument ( err, skip_all) ) ]
363
363
pub async fn install_if_not_installed (
364
364
cfg : & ' a Cfg ,
365
365
desc : & ' a ToolchainDesc ,
@@ -377,7 +377,7 @@ impl<'a> DistributableToolchain<'a> {
377
377
}
378
378
}
379
379
380
- #[ tracing :: instrument ( level = "trace " , err, skip_all) ]
380
+ #[ cfg_attr ( feature = "otel " , tracing :: instrument ( err, skip_all) ) ]
381
381
pub ( crate ) async fn update (
382
382
& mut self ,
383
383
components : & [ & str ] ,
@@ -389,7 +389,7 @@ impl<'a> DistributableToolchain<'a> {
389
389
}
390
390
391
391
/// Update a toolchain with control over the channel behaviour
392
- #[ tracing :: instrument ( level = "trace " , err, skip_all) ]
392
+ #[ cfg_attr ( feature = "otel " , tracing :: instrument ( err, skip_all) ) ]
393
393
pub ( crate ) async fn update_extra (
394
394
& mut self ,
395
395
components : & [ & str ] ,
0 commit comments