Add a thin wrapper around otel Span object
Signed-off-by: Swagat Bora <sbora@amazon.com>
This commit is contained in:
@@ -94,7 +94,7 @@ import (
|
||||
|
||||
// PullImage pulls an image with authentication config.
|
||||
func (c *criService) PullImage(ctx context.Context, r *runtime.PullImageRequest) (*runtime.PullImageResponse, error) {
|
||||
span := tracing.CurrentSpan(ctx)
|
||||
span := tracing.SpanFromContext(ctx)
|
||||
imageRef := r.GetImage().GetImage()
|
||||
namedRef, err := distribution.ParseDockerRef(imageRef)
|
||||
if err != nil {
|
||||
@@ -136,8 +136,8 @@ func (c *criService) PullImage(ctx context.Context, r *runtime.PullImageRequest)
|
||||
}
|
||||
log.G(ctx).Debugf("PullImage %q with snapshotter %s", ref, snapshotter)
|
||||
span.SetAttributes(
|
||||
tracing.SpanAttribute("image.ref", ref),
|
||||
tracing.SpanAttribute("snapshotter.name", snapshotter),
|
||||
tracing.Attribute("image.ref", ref),
|
||||
tracing.Attribute("snapshotter.name", snapshotter),
|
||||
)
|
||||
pullOpts := []containerd.RemoteOpt{
|
||||
containerd.WithSchema1Conversion, //nolint:staticcheck // Ignore SA1019. Need to keep deprecated package for compatibility.
|
||||
|
||||
Reference in New Issue
Block a user