Skip to content

Commit

Permalink
make fewer traces
Browse files Browse the repository at this point in the history
  • Loading branch information
whyrusleeping committed Oct 2, 2023
1 parent cf60dd2 commit 11b4a36
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions carstore/bs.go
Original file line number Diff line number Diff line change
Expand Up @@ -454,9 +454,6 @@ func (cs *CarStore) writeBlockFromShard(ctx context.Context, sh *CarShard, w io.
}

func (cs *CarStore) iterateShardBlocks(ctx context.Context, sh *CarShard, cb func(blk blockformat.Block) error) error {
ctx, span := otel.Tracer("carstore").Start(ctx, "iterateShardBlocks")
defer span.End()

fi, err := os.Open(sh.Path)
if err != nil {
return err
Expand Down Expand Up @@ -1418,6 +1415,8 @@ func (cs *CarStore) compactBucket(ctx context.Context, user models.Uid, b *compB
ctx, span := otel.Tracer("carstore").Start(ctx, "compactBucket")
defer span.End()

span.SetAttributes(attribute.Int("shards", len(b.shards)))

last := b.shards[len(b.shards)-1]
lastsh := shardsById[last.ID]
fi, path, err := cs.openNewCompactedShardFile(ctx, user, last.Seq)
Expand Down

0 comments on commit 11b4a36

Please sign in to comment.