diff --git a/CHANGELOG.md b/CHANGELOG.md index 72f8f180..e26b1548 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ We use *breaking :warning:* to mark changes that are not backward compatible (re - [#33](https://github.com/thanos-io/objstore/pull/33) Tracing: Add `ContextWithTracer()` to inject the tracer into the context. - [#34](https://github.com/thanos-io/objstore/pull/34) Fix ignored options when creating shared credential Azure client. - [#62](https://github.com/thanos-io/objstore/pull/62) S3: Fix ignored context cancellation in `Iter` method. +- [#77](https://github.com/thanos-io/objstore/pull/77) Fix buckets wrapped with metrics from being unable to determine object sizes in `Upload`. ### Added - [#15](https://github.com/thanos-io/objstore/pull/15) Add Oracle Cloud Infrastructure Object Storage Bucket support. diff --git a/objstore.go b/objstore.go index 5bcc55f1..20723704 100644 --- a/objstore.go +++ b/objstore.go @@ -594,7 +594,7 @@ func (b *metricBucket) Upload(ctx context.Context, name string, r io.Reader) err b.ops.WithLabelValues(op).Inc() trc := newTimingReadCloser( - io.NopCloser(r), + NopCloserWithSize(r), op, b.opsDuration, b.opsFailures,