@@ -1273,7 +1273,7 @@ func (sc *syncContext) runTasks(tasks syncTasks, dryRun bool) runState {
12731273 ss .Go (func (state runState ) runState {
12741274 logCtx := sc .log .WithValues ("dryRun" , dryRun , "task" , t )
12751275 logCtx .V (1 ).Info ("Pruning" )
1276- span := sc .syncTracer . StartSpanFromTraceParent ("pruneObject" , sc . syncTraceID , sc . syncTraceRootSpanID )
1276+ span := sc .createSpan ("pruneObject" , dryRun )
12771277 defer span .Finish ()
12781278 result , message := sc .pruneObject (t .liveObj , sc .prune , dryRun )
12791279 if result == common .ResultCodeSyncFailed {
@@ -1303,7 +1303,7 @@ func (sc *syncContext) runTasks(tasks syncTasks, dryRun bool) runState {
13031303 ss .Go (func (state runState ) runState {
13041304 sc .log .WithValues ("dryRun" , dryRun , "task" , t ).V (1 ).Info ("Deleting" )
13051305 if ! dryRun {
1306- span := sc .syncTracer . StartSpanFromTraceParent ("hooksDeletion" , sc . syncTraceID , sc . syncTraceRootSpanID )
1306+ span := sc .createSpan ("hooksDeletion" , dryRun )
13071307 defer span .Finish ()
13081308 err := sc .deleteResource (t )
13091309 message := "deleted"
@@ -1381,7 +1381,7 @@ func (sc *syncContext) processCreateTasks(state runState, tasks syncTasks, dryRu
13811381 logCtx := sc .log .WithValues ("dryRun" , dryRun , "task" , t )
13821382 logCtx .V (1 ).Info ("Applying" )
13831383 validate := sc .validate && ! resourceutil .HasAnnotationOption (t .targetObj , common .AnnotationSyncOptions , common .SyncOptionsDisableValidation )
1384- span := sc .syncTracer . StartSpanFromTraceParent ("applyObject" , sc . syncTraceID , sc . syncTraceRootSpanID )
1384+ span := sc .createSpan ("applyObject" , dryRun )
13851385 defer span .Finish ()
13861386 result , message := sc .applyObject (t , dryRun , validate )
13871387 if result == common .ResultCodeSyncFailed {
0 commit comments