tracing: Create trace function

Simplify code slightly be creating a `trace()` function.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
This commit is contained in:
James O. D. Hunt
2018-08-20 17:32:16 +01:00
parent a193366b3d
commit f0073bec2f
18 changed files with 37 additions and 43 deletions

View File

@@ -18,7 +18,6 @@ import (
"github.com/kata-containers/runtime/virtcontainers/pkg/oci"
vcUtils "github.com/kata-containers/runtime/virtcontainers/utils"
specs "github.com/opencontainers/runtime-spec/specs-go"
opentracing "github.com/opentracing/opentracing-go"
"github.com/urfave/cli"
)
@@ -411,7 +410,7 @@ var kataEnvCLICommand = cli.Command{
return err
}
span, _ := opentracing.StartSpanFromContext(ctx, "kata-env")
span, _ := trace(ctx, "kata-env")
defer span.Finish()
return handleSettings(defaultOutputFile, context)