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/runtime_ctr.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/runtime_ctr.go')
-rw-r--r-- | libpod/runtime_ctr.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libpod/runtime_ctr.go b/libpod/runtime_ctr.go index 185090cf7..1055da75b 100644 --- a/libpod/runtime_ctr.go +++ b/libpod/runtime_ctr.go @@ -15,6 +15,7 @@ import ( "github.com/containers/storage" "github.com/containers/storage/pkg/stringid" spec "github.com/opencontainers/runtime-spec/specs-go" + opentracing "github.com/opentracing/opentracing-go" "github.com/pkg/errors" "github.com/sirupsen/logrus" "github.com/ulule/deepcopier" @@ -46,6 +47,10 @@ func (r *Runtime) NewContainer(ctx context.Context, rSpec *spec.Spec, options .. } func (r *Runtime) newContainer(ctx context.Context, rSpec *spec.Spec, options ...CtrCreateOption) (c *Container, err error) { + span, _ := opentracing.StartSpanFromContext(ctx, "newContainer") + span.SetTag("type", "runtime") + defer span.Finish() + if rSpec == nil { return nil, errors.Wrapf(ErrInvalidArg, "must provide a valid runtime spec to create container") } @@ -241,6 +246,10 @@ func (r *Runtime) RemoveContainer(ctx context.Context, c *Container, force bool, // Internal function to remove a container // Locks the container, but does not lock the runtime func (r *Runtime) removeContainer(ctx context.Context, c *Container, force bool, removeVolume bool) error { + span, _ := opentracing.StartSpanFromContext(ctx, "removeContainer") + span.SetTag("type", "runtime") + defer span.Finish() + if !c.valid { if ok, _ := r.state.HasContainer(c.ID()); !ok { // Container probably already removed |