From 9586d482540ee47e10aed40ca8ba4924fa0d1214 Mon Sep 17 00:00:00 2001 From: Chelsea Mafrica Date: Tue, 10 Aug 2021 14:43:31 -0700 Subject: [PATCH] tracing: Return context in runHooks() span creation The call to Trace() in runHooks() should return a context so that subsequent calls to runHook() produce properly ordered trace spans. Fixes #2423 Signed-off-by: Chelsea Mafrica --- src/runtime/pkg/katautils/hook.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/runtime/pkg/katautils/hook.go b/src/runtime/pkg/katautils/hook.go index 4cd40c972..8aeb6678e 100644 --- a/src/runtime/pkg/katautils/hook.go +++ b/src/runtime/pkg/katautils/hook.go @@ -95,7 +95,7 @@ func runHook(ctx context.Context, hook specs.Hook, cid, bundlePath string) error } func runHooks(ctx context.Context, hooks []specs.Hook, cid, bundlePath, hookType string) error { - span, _ := katatrace.Trace(ctx, hookLogger(), "runHooks", hookTracingTags) + span, ctx := katatrace.Trace(ctx, hookLogger(), "runHooks", hookTracingTags) katatrace.AddTag(span, "type", hookType) defer span.End()