diff options
author | Valentin Rothberg <rothberg@redhat.com> | 2021-02-25 20:47:21 +0100 |
---|---|---|
committer | Valentin Rothberg <rothberg@redhat.com> | 2021-03-08 09:22:42 +0100 |
commit | d0d084dd8ce37141e0a2f0e9def78ffbb613ab94 (patch) | |
tree | bd626d1310b64b2f5410a2ca8a7f5a7232634d2b /libpod/image/image.go | |
parent | 320df838810cbdb0f3dc0e2092f5ed04fc9b6e5d (diff) | |
download | podman-d0d084dd8ce37141e0a2f0e9def78ffbb613ab94.tar.gz podman-d0d084dd8ce37141e0a2f0e9def78ffbb613ab94.tar.bz2 podman-d0d084dd8ce37141e0a2f0e9def78ffbb613ab94.zip |
turn hidden --trace into a NOP
The --trace has helped in early stages analyze Podman code. However,
it's contributing to dependency and binary bloat. The standard go
tooling can also help in profiling, so let's turn `--trace` into a NOP.
[NO TESTS NEEDED]
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Diffstat (limited to 'libpod/image/image.go')
-rw-r--r-- | libpod/image/image.go | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/libpod/image/image.go b/libpod/image/image.go index 8bbf555e3..12dc22360 100644 --- a/libpod/image/image.go +++ b/libpod/image/image.go @@ -38,7 +38,6 @@ import ( "github.com/containers/storage" digest "github.com/opencontainers/go-digest" ociv1 "github.com/opencontainers/image-spec/specs-go/v1" - opentracing "github.com/opentracing/opentracing-go" "github.com/pkg/errors" "github.com/sirupsen/logrus" ) @@ -144,10 +143,6 @@ func (ir *Runtime) NewFromLocal(name string) (*Image, error) { // New creates a new image object where the image could be local // or remote func (ir *Runtime) New(ctx context.Context, name, signaturePolicyPath, authfile string, writer io.Writer, dockeroptions *DockerRegistryOptions, signingoptions SigningOptions, label *string, pullType util.PullType, progress chan types.ProgressProperties) (*Image, error) { - span, _ := opentracing.StartSpanFromContext(ctx, "newImage") - span.SetTag("type", "runtime") - defer span.Finish() - // We don't know if the image is local or not ... check local first if pullType != util.PullImageAlways { newImage, err := ir.NewFromLocal(name) @@ -1297,21 +1292,11 @@ func (i *Image) inspect(ctx context.Context, calculateSize bool) (*inspect.Image // Inspect returns an image's inspect data func (i *Image) Inspect(ctx context.Context) (*inspect.ImageData, error) { - span, _ := opentracing.StartSpanFromContext(ctx, "imageInspect") - - span.SetTag("type", "image") - defer span.Finish() - return i.inspect(ctx, true) } // InspectNoSize returns an image's inspect data without calculating the size for the image func (i *Image) InspectNoSize(ctx context.Context) (*inspect.ImageData, error) { - span, _ := opentracing.StartSpanFromContext(ctx, "imageInspectNoSize") - - span.SetTag("type", "image") - defer span.Finish() - return i.inspect(ctx, false) } |