Add logs for func saveStruct
This commit is contained in:
parent
9dfbdbe878
commit
b31ca726e2
15
save.go
15
save.go
|
@ -195,7 +195,12 @@ func SaveMetaRootStruct(
|
|||
return nil
|
||||
}
|
||||
|
||||
func saveStruct(ctx context.Context, db *db.DBC, dataItem reflect.Value, ownerId uint32) error {
|
||||
func saveStruct(
|
||||
ctx context.Context,
|
||||
db *db.DBC,
|
||||
dataItem reflect.Value,
|
||||
ownerId uint32,
|
||||
) error {
|
||||
|
||||
ctx, span := tracer.Start(ctx, "saveStruct")
|
||||
defer span.End()
|
||||
|
@ -228,7 +233,13 @@ func saveStruct(ctx context.Context, db *db.DBC, dataItem reflect.Value, ownerId
|
|||
|
||||
}
|
||||
|
||||
return SaveRow(ctx, db, row)
|
||||
if err := SaveRow(ctx, db, row); err != nil {
|
||||
span.RecordError(err)
|
||||
span.SetStatus(codes.Error, err.Error())
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func SaveMetaCollection(ctx context.Context, db *db.DBC, slice reflect.Value, ownerId uint32, removedIds meta.IRemovedIds, deltaSave bool) error {
|
||||
|
|
Loading…
Reference in New Issue