diff options
Diffstat (limited to 'metrics-proxy')
-rw-r--r-- | metrics-proxy/src/main/java/ai/vespa/metricsproxy/node/CoredumpMetricGatherer.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/metrics-proxy/src/main/java/ai/vespa/metricsproxy/node/CoredumpMetricGatherer.java b/metrics-proxy/src/main/java/ai/vespa/metricsproxy/node/CoredumpMetricGatherer.java index 91e7fbbc0b5..09f0bbe16a6 100644 --- a/metrics-proxy/src/main/java/ai/vespa/metricsproxy/node/CoredumpMetricGatherer.java +++ b/metrics-proxy/src/main/java/ai/vespa/metricsproxy/node/CoredumpMetricGatherer.java @@ -8,6 +8,7 @@ import com.yahoo.vespa.defaults.Defaults; import java.io.IOException; import java.io.UncheckedIOException; +import java.nio.file.NoSuchFileException; import java.nio.file.Path; import java.time.Instant; import java.util.Set; @@ -38,6 +39,8 @@ public class CoredumpMetricGatherer { return (int) fileWrapper.walkTree(COREDUMP_PATH) .filter(fileWrapper::isRegularFile) .count(); + } catch (NoSuchFileException e) { + return 0; } catch (IOException e) { throw new UncheckedIOException(e); } |