diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-02-18 22:01:14 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-18 22:01:14 +0100 |
commit | c9b13133cdd9f59a000d40fce357c33919ef7032 (patch) | |
tree | bfa2e524b71757a514a02ef68661b46dca9a3dfe /libpod/container_api.go | |
parent | e738ef16225395f5f5e4b93ba1a43ae9449ae11b (diff) | |
parent | 7141f972700ed454438d8539dd0bec79c0b61cf4 (diff) | |
download | podman-c9b13133cdd9f59a000d40fce357c33919ef7032.tar.gz podman-c9b13133cdd9f59a000d40fce357c33919ef7032.tar.bz2 podman-c9b13133cdd9f59a000d40fce357c33919ef7032.zip |
Merge pull request #1692 from sjug/opentracing_clean
OpenTracing First Impl
Diffstat (limited to 'libpod/container_api.go')
-rw-r--r-- | libpod/container_api.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libpod/container_api.go b/libpod/container_api.go index abe0df610..09d7f220d 100644 --- a/libpod/container_api.go +++ b/libpod/container_api.go @@ -14,6 +14,7 @@ import ( "github.com/containers/libpod/pkg/lookup" "github.com/containers/storage/pkg/stringid" "github.com/docker/docker/daemon/caps" + opentracing "github.com/opentracing/opentracing-go" "github.com/pkg/errors" "github.com/sirupsen/logrus" "k8s.io/apimachinery/pkg/util/wait" @@ -22,6 +23,10 @@ import ( // Init creates a container in the OCI runtime func (c *Container) Init(ctx context.Context) (err error) { + span, _ := opentracing.StartSpanFromContext(ctx, "containerInit") + span.SetTag("struct", "container") + defer span.Finish() + if !c.batched { c.lock.Lock() defer c.lock.Unlock() @@ -66,6 +71,10 @@ func (c *Container) Init(ctx context.Context) (err error) { // Init(). // If recursive is set, Start will also start all containers this container depends on. func (c *Container) Start(ctx context.Context, recursive bool) (err error) { + span, _ := opentracing.StartSpanFromContext(ctx, "containerStart") + span.SetTag("struct", "container") + defer span.Finish() + if !c.batched { c.lock.Lock() defer c.lock.Unlock() |