@Override
    public List<MetricFamilySamples> collect() {
      List<Collector.MetricFamilySamples> results = new ArrayList<>();
      for (var entry : filesToMonitor.entrySet()) {
        String name = sanitizeMetricName(entry.getKey());
        MonitoredFile monitoredFile = entry.getValue();
        Path path = monitoredFile.path();
        long size = monitoredFile.sizeProvider().getAsLong();
        results.add(new GaugeMetricFamily(BASE + "file_" + name + "_size_bytes", "Size of " + name + " in bytes",
          size));
        if (Files.exists(path)) {
          try {
            FileStore fileStore = Files.getFileStore(path);
            results
              .add(
                new GaugeMetricFamily(BASE + "file_" + name + "_total_space_bytes", "Total space available on disk",
                  fileStore.getTotalSpace()));
            results.add(
              new GaugeMetricFamily(BASE + "file_" + name + "_unallocated_space_bytes", "Unallocated space on disk",
                fileStore.getUnallocatedSpace()));
            results
              .add(new GaugeMetricFamily(BASE + "file_" + name + "_usable_space_bytes", "Usable space on disk",
                fileStore.getUsableSpace()));
          } catch (IOException e) {
            // let the user know once
            if (!logged) {
              LOGGER.warn("unable to get usable space on device", e);
              logged = true;
            }
          }
        }
      }
      return results;
    }
Reports stats on all file sizes being monitored through {@link #monitorFile(String, Path)}.
planetiler-core/src/main/java/com/onthegomap/planetiler/stats/PrometheusStats.java