Skip to content

Commit 1a1add8

Browse files
committed
feat: add telemetry for image sync errors
1 parent a1cc051 commit 1a1add8

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

internal/sync/images.go

+13
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,19 @@ func SyncImage(ctx context.Context, image *structs.Image) error {
190190
Strs("targets", image.Targets).
191191
Msg("Syncing tag")
192192

193+
telemetry.Errors.Add(ctx, 0,
194+
metric.WithAttributes(
195+
attribute.KeyValue{
196+
Key: "image",
197+
Value: attribute.StringValue(image.Source),
198+
},
199+
attribute.KeyValue{
200+
Key: "tag",
201+
Value: attribute.StringValue(tag),
202+
},
203+
),
204+
)
205+
193206
if err := func() error {
194207
tag := tag
195208

0 commit comments

Comments
 (0)