@@ -273,10 +273,10 @@ where
273
273
let reconciler_span = info_span ! ( "reconciling object" , "object.ref" = %request. obj_ref, object. reason = %request. reason) ;
274
274
reconciler_span. in_scope ( || reconciler ( obj, context. clone ( ) ) )
275
275
. into_future ( )
276
- . instrument ( reconciler_span)
276
+ . instrument ( reconciler_span. clone ( ) )
277
277
// Reconciler errors are OK from the applier's PoV, we need to apply the error policy
278
278
// to them separately
279
- . map ( |res| Ok ( ( request. obj_ref , res) ) )
279
+ . map ( |res| Ok ( ( request. obj_ref , res, reconciler_span ) ) )
280
280
. left_future ( )
281
281
} ,
282
282
None => future:: err (
@@ -295,14 +295,14 @@ where
295
295
)
296
296
. on_complete ( async { tracing:: debug!( "applier runner-merge terminated" ) } )
297
297
// finally, for each completed reconcile call:
298
- . and_then ( move |( obj_ref, reconciler_result) | {
298
+ . and_then ( move |( obj_ref, reconciler_result, reconciler_span ) | {
299
299
let ( ReconcilerAction { requeue_after } , requeue_reason) = match & reconciler_result {
300
300
Ok ( action) =>
301
301
// do what user told us
302
302
( action. clone ( ) , ReconcileReason :: ReconcilerRequestedRetry ) ,
303
303
Err ( err) =>
304
304
// reconciler fn call failed
305
- ( error_policy ( err, err_context. clone ( ) ) , ReconcileReason :: ErrorPolicyRequestedRetry ) ,
305
+ ( reconciler_span . in_scope ( || error_policy ( err, err_context. clone ( ) ) ) , ReconcileReason :: ErrorPolicyRequestedRetry ) ,
306
306
} ;
307
307
let mut scheduler_tx = scheduler_tx. clone ( ) ;
308
308
async move {
@@ -486,12 +486,11 @@ where
486
486
/// To watch the full set of `Child` objects in the given `Api` scope, you can use [`ListParams::default`].
487
487
///
488
488
/// [`OwnerReference`]: k8s_openapi::apimachinery::pkg::apis::meta::v1::OwnerReference
489
- pub fn owns < Child : Clone + Resource < DynamicType = ( ) > + DeserializeOwned + Debug + Send + ' static > (
489
+ pub fn owns < Child : Clone + Resource < DynamicType = ( ) > + DeserializeOwned + Debug + Send + ' static > (
490
490
self ,
491
491
api : Api < Child > ,
492
492
lp : ListParams ,
493
- ) -> Self
494
- {
493
+ ) -> Self {
495
494
self . owns_with ( api, ( ) , lp)
496
495
}
497
496
@@ -529,7 +528,7 @@ where
529
528
/// to watch - in the Api's configured scope - and run through the custom mapper.
530
529
/// To watch the full set of `Watched` objects in given the `Api` scope, you can use [`ListParams::default`].
531
530
pub fn watches <
532
- Other : Clone + Resource < DynamicType = ( ) > + DeserializeOwned + Debug + Send + ' static ,
531
+ Other : Clone + Resource < DynamicType = ( ) > + DeserializeOwned + Debug + Send + ' static ,
533
532
I : ' static + IntoIterator < Item = ObjectRef < K > > ,
534
533
> (
535
534
self ,
0 commit comments