public String getMetricsAsString() {
    try (StringWriter writer = new StringWriter()) {
      TextFormat.write004(writer, registry.metricFamilySamples());
      return writer.toString();
    } catch (IOException e) {
      throw new IllegalStateException(e);
    }
  }
Returns the full payload that we would send to push gateway for a poll right way.
planetiler-core/src/main/java/com/onthegomap/planetiler/stats/PrometheusStats.java