diff --git a/storage/gcs/src/main/java/io/aiven/kafka/tieredstorage/storage/gcs/GcsStorage.java b/storage/gcs/src/main/java/io/aiven/kafka/tieredstorage/storage/gcs/GcsStorage.java index 198c088ef..91728a62f 100644 --- a/storage/gcs/src/main/java/io/aiven/kafka/tieredstorage/storage/gcs/GcsStorage.java +++ b/storage/gcs/src/main/java/io/aiven/kafka/tieredstorage/storage/gcs/GcsStorage.java @@ -36,8 +36,6 @@ import com.google.cloud.storage.StorageOptions; public class GcsStorage implements StorageBackend { - private final MetricCollector metricCollector = new MetricCollector(); - private Storage storage; private String bucketName; private Integer resumableUploadChunkSize; @@ -48,7 +46,7 @@ public void configure(final Map configs) { this.bucketName = config.bucketName(); final StorageOptions.Builder builder = StorageOptions.newBuilder() .setCredentials(config.credentials()) - .setTransportOptions(metricCollector.httpTransportOptions()); + .setTransportOptions(new MetricCollector().httpTransportOptions()); if (config.endpointUrl() != null) { builder.setHost(config.endpointUrl()); }