Skip to content

Commit

Permalink
warn instead of error
Browse files Browse the repository at this point in the history
Signed-off-by: see-quick <[email protected]>
  • Loading branch information
see-quick committed Jun 6, 2024
1 parent 4ba37d3 commit 10c70c6
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
}
},
Expand Down

0 comments on commit 10c70c6

Please sign in to comment.