diff --git a/src/main/java/org/opensearch/performanceanalyzer/collectors/telemetry/RTFCacheConfigMetricsCollector.java b/src/main/java/org/opensearch/performanceanalyzer/collectors/telemetry/RTFCacheConfigMetricsCollector.java deleted file mode 100644 index 544dc92d..00000000 --- a/src/main/java/org/opensearch/performanceanalyzer/collectors/telemetry/RTFCacheConfigMetricsCollector.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - */ - -package org.opensearch.performanceanalyzer.collectors.telemetry; - -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; -import org.opensearch.performanceanalyzer.OpenSearchResources; -import org.opensearch.performanceanalyzer.commons.collectors.PerformanceAnalyzerMetricsCollector; -import org.opensearch.performanceanalyzer.commons.collectors.TelemetryCollector; -import org.opensearch.performanceanalyzer.commons.config.overrides.ConfigOverridesWrapper; -import org.opensearch.performanceanalyzer.commons.metrics.MetricsConfiguration; -import org.opensearch.performanceanalyzer.commons.stats.metrics.StatExceptionCode; -import org.opensearch.performanceanalyzer.commons.stats.metrics.StatMetrics; -import org.opensearch.performanceanalyzer.config.PerformanceAnalyzerController; -import org.opensearch.telemetry.metrics.MetricsRegistry; - -public class RTFCacheConfigMetricsCollector extends PerformanceAnalyzerMetricsCollector - implements TelemetryCollector { - private static final Logger LOG = LogManager.getLogger(RTFCacheConfigMetricsCollector.class); - public static final int SAMPLING_TIME_INTERVAL = - MetricsConfiguration.CONFIG_MAP.get(RTFCacheConfigMetricsCollector.class) - .samplingInterval; - private boolean metricsInitialised; - private PerformanceAnalyzerController performanceAnalyzerController; - private ConfigOverridesWrapper configOverridesWrapper; - private MetricsRegistry metricsRegistry; - - public RTFCacheConfigMetricsCollector( - PerformanceAnalyzerController performanceAnalyzerController, - ConfigOverridesWrapper configOverridesWrapper) { - super( - SAMPLING_TIME_INTERVAL, - "RTFCacheConfigMetricsCollector", - StatMetrics.CACHE_CONFIG_METRICS_COLLECTOR_EXECUTION_TIME, - StatExceptionCode.CACHE_CONFIG_METRICS_COLLECTOR_ERROR); - this.metricsInitialised = false; - this.performanceAnalyzerController = performanceAnalyzerController; - this.configOverridesWrapper = configOverridesWrapper; - } - - @Override - public void collectMetrics(long startTime) { - if (performanceAnalyzerController.isCollectorDisabled( - configOverridesWrapper, getCollectorName())) { - LOG.info("RTFDisksCollector is disabled. Skipping collection."); - return; - } - - metricsRegistry = OpenSearchResources.INSTANCE.getMetricsRegistry(); - if (metricsRegistry == null) { - LOG.error("could not get the instance of MetricsRegistry class"); - return; - } - } -}