From 98f9a1470a67a8ca6a048a5f72b17d4b7cf1bef5 Mon Sep 17 00:00:00 2001 From: see-quick Date: Thu, 6 Jun 2024 09:55:22 +0200 Subject: [PATCH] warn instead of error Signed-off-by: see-quick --- .../main/java/io/skodjob/testframe/MetricsCollector.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test-frame-metrics-collector/src/main/java/io/skodjob/testframe/MetricsCollector.java b/test-frame-metrics-collector/src/main/java/io/skodjob/testframe/MetricsCollector.java index 5414da0..3e2a15f 100644 --- a/test-frame-metrics-collector/src/main/java/io/skodjob/testframe/MetricsCollector.java +++ b/test-frame-metrics-collector/src/main/java/io/skodjob/testframe/MetricsCollector.java @@ -440,13 +440,13 @@ public final void collectMetricsFromPods(long timeoutDuration) { if (metricsData.isEmpty()) { status.setMessage("No pods found or no metrics available from pods."); status.setType(MetricsCollectionStatus.Type.NO_DATA); - LOGGER.error("Metrics collection failed: {}", status.getMessage()); + LOGGER.warn("Metrics collection failed: {}", status.getMessage()); return false; } if (metricsData.values().stream().anyMatch(String::isEmpty)) { status.setMessage("Incomplete metrics data collected."); status.setType(MetricsCollectionStatus.Type.INCOMPLETE_DATA); - LOGGER.error("Metrics collection incomplete: Some pods returned empty metrics."); + LOGGER.warn("Metrics collection incomplete: Some pods returned empty metrics."); return false; } this.collectedData = metricsData; @@ -455,7 +455,7 @@ public final void collectMetricsFromPods(long timeoutDuration) { status.setMessage(e.getMessage()); status.setType(MetricsCollectionStatus.Type.ERROR); status.setException(e); - LOGGER.error("Error during metrics collection: {}", status.getMessage(), e); + LOGGER.warn("Error during metrics collection: {}", status.getMessage(), e); return false; } },