objstore
objstore copied to clipboard
feat: Decouple creating bucket metrics from instrumenting the bucket
- [x] I added CHANGELOG entry for this change.
- [x] Change is not relevant to the end user.
Changes
Currently if a single process uses multiple object client, we get metrics duplicate registration failures.
With this PR,
- New
BucketMetrics
API return just aMetrics
that can be created once and used for multiple clients. - New
Wrap
API that takesmetrics
and returns instrumented bucket just likeWrapWithMetrics
API.
This PR doesn't change any existing API WrapWithMetrics
Verification
Not breaking any existing API(s). All existing tests passes