Skip to content

Commit

Permalink
fix(operator): Use correct parent/child span relationship
Browse files Browse the repository at this point in the history
Signed-off-by: Giovanni Liva <[email protected]>
  • Loading branch information
thisthat committed Nov 15, 2022
1 parent c4502e1 commit 2579c76
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion operator/controllers/common/phasehandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func (r PhaseHandler) HandlePhase(ctx context.Context, ctxAppTrace context.Conte
piWrapper.SetCurrentPhase(phase.ShortName)

r.Log.Info(phase.LongName + " not finished")
ctxAppTrace, spanAppTrace, err := r.SpanHandler.GetSpan(ctxAppTrace, tracer, reconcileObject, phase.ShortName)
_, spanAppTrace, err := r.SpanHandler.GetSpan(ctxAppTrace, tracer, reconcileObject, phase.ShortName)
if err != nil {
r.Log.Error(err, "could not get span")
}
Expand Down
3 changes: 2 additions & 1 deletion operator/controllers/keptnappversion/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@ func (r *KeptnAppVersionReconciler) Reconcile(ctx context.Context, req ctrl.Requ
r.Log.Error(err, "cannot unbind span")
}
var spanAppTrace trace.Span
ctxAppTrace, spanAppTrace, err = r.SpanHandler.GetSpan(ctxAppTrace, r.Tracer, appVersion, phase.ShortName)
// ignoring ctx to don't use this as parent span
_, spanAppTrace, err = r.SpanHandler.GetSpan(ctxAppTrace, r.Tracer, appVersion, phase.ShortName)
if err != nil {
r.Log.Error(err, "could not get span")
}
Expand Down

0 comments on commit 2579c76

Please sign in to comment.