@@ -70,26 +70,34 @@ impl ReleaseSpec {
7070 let namespace = namespace. to_string ( ) ;
7171 futures:: stream:: iter ( self . filter_products ( include_products, exclude_products) )
7272 . map ( |( product_name, product) | {
73+ let task_span =
74+ tracing:: debug_span!( "install_operator" , product_name = tracing:: field:: Empty ) ;
75+
7376 let namespace = namespace. clone ( ) ;
7477 let chart_source = chart_source. clone ( ) ;
7578 // Helm installs currently `block_in_place`, so we need to spawn each job onto a separate task to
7679 // get useful parallelism.
77- tokio:: spawn ( async move {
78- info ! ( "Installing {product_name}-operator" ) ;
79-
80- // Create operator spec
81- let operator = OperatorSpec :: new ( & product_name, Some ( product. version . clone ( ) ) )
82- . context ( OperatorSpecParseSnafu ) ?;
83-
84- // Install operator
85- operator
86- . install ( & namespace, & chart_source)
87- . context ( HelmInstallSnafu ) ?;
88-
89- info ! ( "Installed {product_name}-operator" ) ;
90-
91- Ok ( ( ) )
92- } )
80+ tokio:: spawn (
81+ async move {
82+ Span :: current ( ) . record ( "product_name" , & product_name) ;
83+ info ! ( "Installing {product_name}-operator" ) ;
84+
85+ // Create operator spec
86+ let operator =
87+ OperatorSpec :: new ( & product_name, Some ( product. version . clone ( ) ) )
88+ . context ( OperatorSpecParseSnafu ) ?;
89+
90+ // Install operator
91+ operator
92+ . install ( & namespace, & chart_source)
93+ . context ( HelmInstallSnafu ) ?;
94+
95+ info ! ( "Installed {product_name}-operator" ) ;
96+
97+ Ok ( ( ) )
98+ }
99+ . instrument ( task_span) ,
100+ )
93101 } )
94102 . buffer_unordered ( 10 )
95103 . map ( |res| res. context ( BackgroundTaskSnafu ) ?)
0 commit comments