@@ -36,7 +36,6 @@ import (
|
||||
"github.com/containerd/imgcrypt"
|
||||
"github.com/containerd/imgcrypt/images/encryption"
|
||||
imagespec "github.com/opencontainers/image-spec/specs-go/v1"
|
||||
"go.opentelemetry.io/otel/attribute"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1"
|
||||
|
||||
"github.com/containerd/containerd"
|
||||
@@ -137,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(
|
||||
attribute.String("image.ref", ref),
|
||||
attribute.String("snapshotter.name", snapshotter),
|
||||
tracing.SpanAttribute("image.ref", ref),
|
||||
tracing.SpanAttribute("snapshotter.name", snapshotter),
|
||||
)
|
||||
|
||||
pullOpts := []containerd.RemoteOpt{
|
||||
|
||||
@@ -23,7 +23,6 @@ import (
|
||||
"github.com/containerd/containerd/errdefs"
|
||||
"github.com/containerd/containerd/images"
|
||||
"github.com/containerd/containerd/tracing"
|
||||
"go.opentelemetry.io/otel/attribute"
|
||||
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1"
|
||||
)
|
||||
@@ -45,7 +44,7 @@ func (c *criService) RemoveImage(ctx context.Context, r *runtime.RemoveImageRequ
|
||||
}
|
||||
return nil, fmt.Errorf("can not resolve %q locally: %w", r.GetImage().GetImage(), err)
|
||||
}
|
||||
span.SetAttributes(attribute.String("image.id", image.ID))
|
||||
span.SetAttributes(tracing.SpanAttribute("image.id", image.ID))
|
||||
// Remove all image references.
|
||||
for i, ref := range image.References {
|
||||
var opts []images.DeleteOpt
|
||||
|
||||
@@ -25,7 +25,6 @@ import (
|
||||
"github.com/containerd/containerd/log"
|
||||
imagestore "github.com/containerd/containerd/pkg/cri/store/image"
|
||||
"github.com/containerd/containerd/tracing"
|
||||
"go.opentelemetry.io/otel/attribute"
|
||||
|
||||
imagespec "github.com/opencontainers/image-spec/specs-go/v1"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1"
|
||||
@@ -45,7 +44,7 @@ func (c *criService) ImageStatus(ctx context.Context, r *runtime.ImageStatusRequ
|
||||
}
|
||||
return nil, fmt.Errorf("can not resolve %q locally: %w", r.GetImage().GetImage(), err)
|
||||
}
|
||||
span.SetAttributes(attribute.String("image.id", image.ID))
|
||||
span.SetAttributes(tracing.SpanAttribute("image.id", image.ID))
|
||||
// TODO(random-liu): [P0] Make sure corresponding snapshot exists. What if snapshot
|
||||
// doesn't exist?
|
||||
|
||||
|
||||
@@ -36,7 +36,6 @@ import (
|
||||
"github.com/containerd/imgcrypt"
|
||||
"github.com/containerd/imgcrypt/images/encryption"
|
||||
imagespec "github.com/opencontainers/image-spec/specs-go/v1"
|
||||
"go.opentelemetry.io/otel/attribute"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1"
|
||||
|
||||
"github.com/containerd/containerd"
|
||||
@@ -137,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(
|
||||
attribute.String("image.ref", ref),
|
||||
attribute.String("snapshotter.name", snapshotter),
|
||||
tracing.SpanAttribute("image.ref", ref),
|
||||
tracing.SpanAttribute("snapshotter.name", snapshotter),
|
||||
)
|
||||
pullOpts := []containerd.RemoteOpt{
|
||||
containerd.WithSchema1Conversion, //nolint:staticcheck // Ignore SA1019. Need to keep deprecated package for compatibility.
|
||||
|
||||
@@ -23,7 +23,6 @@ import (
|
||||
"github.com/containerd/containerd/errdefs"
|
||||
"github.com/containerd/containerd/images"
|
||||
"github.com/containerd/containerd/tracing"
|
||||
"go.opentelemetry.io/otel/attribute"
|
||||
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1"
|
||||
)
|
||||
@@ -45,7 +44,7 @@ func (c *criService) RemoveImage(ctx context.Context, r *runtime.RemoveImageRequ
|
||||
}
|
||||
return nil, fmt.Errorf("can not resolve %q locally: %w", r.GetImage().GetImage(), err)
|
||||
}
|
||||
span.SetAttributes(attribute.String("image.id", image.ID))
|
||||
span.SetAttributes(tracing.SpanAttribute("image.id", image.ID))
|
||||
// Remove all image references.
|
||||
for i, ref := range image.References {
|
||||
var opts []images.DeleteOpt
|
||||
|
||||
@@ -25,7 +25,6 @@ import (
|
||||
"github.com/containerd/containerd/log"
|
||||
imagestore "github.com/containerd/containerd/pkg/cri/store/image"
|
||||
"github.com/containerd/containerd/tracing"
|
||||
"go.opentelemetry.io/otel/attribute"
|
||||
|
||||
imagespec "github.com/opencontainers/image-spec/specs-go/v1"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1"
|
||||
@@ -45,7 +44,7 @@ func (c *criService) ImageStatus(ctx context.Context, r *runtime.ImageStatusRequ
|
||||
}
|
||||
return nil, fmt.Errorf("can not resolve %q locally: %w", r.GetImage().GetImage(), err)
|
||||
}
|
||||
span.SetAttributes(attribute.String("image.id", image.ID))
|
||||
span.SetAttributes(tracing.SpanAttribute("image.id", image.ID))
|
||||
// TODO(random-liu): [P0] Make sure corresponding snapshot exists. What if snapshot
|
||||
// doesn't exist?
|
||||
|
||||
|
||||
Reference in New Issue
Block a user