Skip to content

Commit 92b521a

Browse files
committed
cp dines
1 parent c8c1ae8 commit 92b521a

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

pkg/convertor/convertor.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -678,9 +678,16 @@ func (c *overlaybdConvertor) applyOCIV1LayerInObd(
678678
afterApply func(root string) error, // do something after apply tar stream
679679
) (string, error) {
680680
startTime := time.Now()
681+
var parentIDAttr attribute.KeyValue
682+
if parentID != "" {
683+
parentIDAttr = attribute.String("parent_id", parentID)
684+
} else {
685+
parentIDAttr = attribute.String("parent_id", "<root>")
686+
}
687+
681688
ctx, span := tracer.Start(ctx, "applyOCIV1LayerInObd",
682689
trace.WithAttributes(
683-
attribute.String("parent_id", parentID),
690+
parentIDAttr,
684691
attribute.String("digest", desc.Digest.String()),
685692
attribute.Int64("size", desc.Size),
686693
attribute.String("media_type", desc.MediaType),

0 commit comments

Comments
 (0)