From 11b4a36a0ec9881a0c559b053d0d20565ec7031d Mon Sep 17 00:00:00 2001 From: whyrusleeping Date: Mon, 2 Oct 2023 16:28:08 -0700 Subject: [PATCH] make fewer traces --- carstore/bs.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/carstore/bs.go b/carstore/bs.go index 4dd057357..a1afebd0e 100644 --- a/carstore/bs.go +++ b/carstore/bs.go @@ -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 @@ -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)