@@ -74,7 +74,7 @@ func (dc *DeploymentController) sync(d *apps.Deployment, rsList []*apps.ReplicaS
74
74
// that were paused for longer than progressDeadlineSeconds.
75
75
func (dc * DeploymentController ) checkPausedConditions (d * apps.Deployment ) error {
76
76
// Get span from annotations and set to ctx
77
- ctx := httptrace .SpanContextFromAnnotations (context .Background (), d . GetAnnotations () )
77
+ ctx := httptrace .SpanContextWithObject (context .Background (), d )
78
78
79
79
if ! deploymentutil .HasProgressDeadline (d ) {
80
80
return nil
@@ -141,7 +141,7 @@ const (
141
141
// Note that the pod-template-hash will be added to adopted RSes and pods.
142
142
func (dc * DeploymentController ) getNewReplicaSet (d * apps.Deployment , rsList , oldRSs []* apps.ReplicaSet , createIfNotExisted bool ) (* apps.ReplicaSet , error ) {
143
143
// Get span from annotations and set to ctx
144
- ctx := httptrace .SpanContextFromAnnotations (context .Background (), d . GetAnnotations () )
144
+ ctx := httptrace .SpanContextWithObject (context .Background (), d )
145
145
146
146
existingNewRS := deploymentutil .FindNewReplicaSet (d , rsList )
147
147
@@ -418,7 +418,7 @@ func (dc *DeploymentController) scaleReplicaSetAndRecordEvent(rs *apps.ReplicaSe
418
418
419
419
func (dc * DeploymentController ) scaleReplicaSet (rs * apps.ReplicaSet , newScale int32 , deployment * apps.Deployment , scalingOperation string ) (bool , * apps.ReplicaSet , error ) {
420
420
// Get span from annotations and set to ctx
421
- ctx := httptrace .SpanContextFromAnnotations (context .Background (), rs . GetAnnotations () )
421
+ ctx := httptrace .SpanContextWithObject (context .Background (), rs )
422
422
423
423
sizeNeedsUpdate := * (rs .Spec .Replicas ) != newScale
424
424
@@ -444,7 +444,7 @@ func (dc *DeploymentController) scaleReplicaSet(rs *apps.ReplicaSet, newScale in
444
444
// around by default 1) for historical reasons and 2) for the ability to rollback a deployment.
445
445
func (dc * DeploymentController ) cleanupDeployment (oldRSs []* apps.ReplicaSet , deployment * apps.Deployment ) error {
446
446
// Get span from annotations and set to ctx
447
- ctx := httptrace .SpanContextFromAnnotations (context .Background (), deployment . GetAnnotations () )
447
+ ctx := httptrace .SpanContextWithObject (context .Background (), deployment )
448
448
449
449
if ! deploymentutil .HasRevisionHistoryLimit (deployment ) {
450
450
return nil
@@ -483,8 +483,8 @@ func (dc *DeploymentController) cleanupDeployment(oldRSs []*apps.ReplicaSet, dep
483
483
484
484
// syncDeploymentStatus checks if the status is up-to-date and sync it if necessary
485
485
func (dc * DeploymentController ) syncDeploymentStatus (allRSs []* apps.ReplicaSet , newRS * apps.ReplicaSet , d * apps.Deployment ) error {
486
- // Get span from annotations and set to ctx
487
- ctx := httptrace .SpanContextFromAnnotations (context .Background (), d . GetAnnotations () )
486
+ // Get span and baggage from object and set to ctx
487
+ ctx := httptrace .SpanContextWithObject (context .Background (), d )
488
488
489
489
newStatus := calculateStatus (allRSs , newRS , d )
490
490
0 commit comments