mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-28 16:27:50 +00:00
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 <chelsea.e.mafrica@intel.com>
This commit is contained in:
parent
036d3a4088
commit
c453919911
@ -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.
|
// StartVM will start the VMM and boot the virtual machine for the given sandbox.
|
||||||
func (clh *cloudHypervisor) StartVM(ctx context.Context, timeout int) error {
|
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()
|
defer span.End()
|
||||||
|
|
||||||
clh.Logger().WithField("function", "StartVM").Info("starting Sandbox")
|
clh.Logger().WithField("function", "StartVM").Info("starting Sandbox")
|
||||||
|
Loading…
Reference in New Issue
Block a user