diff --git a/pkg/shipper/shipper.go b/pkg/shipper/shipper.go index 35782373718..8c567d16040 100644 --- a/pkg/shipper/shipper.go +++ b/pkg/shipper/shipper.go @@ -333,7 +333,6 @@ func (s *Shipper) Sync(ctx context.Context) (uploaded int, err error) { meta.Uploaded = append(meta.Uploaded, m.ULID) uploaded++ s.metrics.uploads.Inc() - s.metrics.uploadedBytes(m.) } if err := WriteMetaFile(s.logger, s.dir, meta); err != nil { level.Warn(s.logger).Log("msg", "updating meta file failed", "err", err) @@ -387,11 +386,13 @@ func (s *Shipper) upload(ctx context.Context, meta *metadata.Meta) error { return errors.Wrap(err, "write meta file") } - if block.Upload(ctx, s.logger, s.bucket, updir, s.hashFunc) != nil{ + err := block.Upload(ctx, s.logger, s.bucket, updir, s.hashFunc) + + if err != nil { return errors.Wrap(err, "while upploading the block") } - files, err := block.GatherFileStats() + files, err := block.GatherFileStats(updir, s.hashFunc, s.logger) if err != nil { //The block upload should not stop due to issues gathering data for a metric