From c4539199118f581d160c8ab680db06b519b4614e Mon Sep 17 00:00:00 2001 From: Chelsea Mafrica Date: Mon, 13 Feb 2023 12:35:38 -0800 Subject: [PATCH] runtime: tracing: Fix missing ctx return Normally we return the context when creating a trace span so that the ordering of spans w.r.t. calls is maintained in tracing output. Add missing context for StartVM() for Cloud Hypervisor. Fixes #6271 Signed-off-by: Chelsea Mafrica --- src/runtime/virtcontainers/clh.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/runtime/virtcontainers/clh.go b/src/runtime/virtcontainers/clh.go index dffd4213a7..71bd931dce 100644 --- a/src/runtime/virtcontainers/clh.go +++ b/src/runtime/virtcontainers/clh.go @@ -647,7 +647,7 @@ func (clh *cloudHypervisor) CreateVM(ctx context.Context, id string, network Net // StartVM will start the VMM and boot the virtual machine for the given sandbox. func (clh *cloudHypervisor) StartVM(ctx context.Context, timeout int) error { - span, _ := katatrace.Trace(ctx, clh.Logger(), "StartVM", clhTracingTags, map[string]string{"sandbox_id": clh.id}) + span, ctx := katatrace.Trace(ctx, clh.Logger(), "StartVM", clhTracingTags, map[string]string{"sandbox_id": clh.id}) defer span.End() clh.Logger().WithField("function", "StartVM").Info("starting Sandbox")