runtime: Fix trace span ordering

Return ctx in trace() functions to correct span ordering.

Fixes #1550

Signed-off-by: Chelsea Mafrica <chelsea.e.mafrica@intel.com>
This commit is contained in:
Chelsea Mafrica
2021-03-25 10:42:25 -07:00
parent 5b5b5cc611
commit f3ebbb1f1a
10 changed files with 52 additions and 52 deletions

View File

@@ -700,7 +700,7 @@ func (c *Container) createBlockDevices(ctx context.Context) error {
// newContainer creates a Container structure from a sandbox and a container configuration.
func newContainer(ctx context.Context, sandbox *Sandbox, contConfig *ContainerConfig) (*Container, error) {
span, _ := sandbox.trace(ctx, "newContainer")
span, ctx := sandbox.trace(ctx, "newContainer")
defer span.End()
if !contConfig.valid() {