diff options
author | Sebastian Jug <sejug@redhat.com> | 2018-10-16 16:30:53 -0400 |
---|---|---|
committer | Sebastian Jug <seb@stianj.ug> | 2019-02-18 09:57:08 -0500 |
commit | 7141f972700ed454438d8539dd0bec79c0b61cf4 (patch) | |
tree | bfa2e524b71757a514a02ef68661b46dca9a3dfe /libpod/container_internal_linux.go | |
parent | e738ef16225395f5f5e4b93ba1a43ae9449ae11b (diff) | |
download | podman-7141f972700ed454438d8539dd0bec79c0b61cf4.tar.gz podman-7141f972700ed454438d8539dd0bec79c0b61cf4.tar.bz2 podman-7141f972700ed454438d8539dd0bec79c0b61cf4.zip |
OpenTracing support added to start, stop, run, create, pull, and ps
Drop context.Context field from cli.Context
Signed-off-by: Sebastian Jug <sejug@redhat.com>
Diffstat (limited to 'libpod/container_internal_linux.go')
-rw-r--r-- | libpod/container_internal_linux.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libpod/container_internal_linux.go b/libpod/container_internal_linux.go index 65cb47c8c..86f94477e 100644 --- a/libpod/container_internal_linux.go +++ b/libpod/container_internal_linux.go @@ -31,6 +31,7 @@ import ( spec "github.com/opencontainers/runtime-spec/specs-go" "github.com/opencontainers/runtime-tools/generate" "github.com/opencontainers/selinux/go-selinux/label" + opentracing "github.com/opentracing/opentracing-go" "github.com/pkg/errors" "github.com/sirupsen/logrus" "golang.org/x/sys/unix" @@ -170,10 +171,15 @@ func (c *Container) cleanupNetwork() error { // Generate spec for a container // Accepts a map of the container's dependencies func (c *Container) generateSpec(ctx context.Context) (*spec.Spec, error) { + span, _ := opentracing.StartSpanFromContext(ctx, "generateSpec") + span.SetTag("type", "container") + defer span.Finish() + execUser, err := lookup.GetUserGroupInfo(c.state.Mountpoint, c.config.User, nil) if err != nil { return nil, err } + g := generate.NewFromSpec(c.config.Spec) // If network namespace was requested, add it now |