File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff 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 ),
You can’t perform that action at this time.
0 commit comments