static Optional<RawMetric> parse(String s) {
    Matcher matcher = PATTERN.matcher(s);
    if (matcher.matches()) {
      String value = matcher.group("value");
      String metricName = matcher.group("metricName");
      if (metricName == null || !NumberUtils.isCreatable(value)) {
        return Optional.empty();
      }
      var labels = Arrays.stream(matcher.group("properties").split(","))
          .filter(str -> !"".equals(str))
          .map(str -> str.split("="))
          .filter(spit -> spit.length == 2)
          .collect(Collectors.toUnmodifiableMap(
              str -> str[0].trim(),
              str -> str[1].trim().replace("\"", "")));

      return Optional.of(RawMetric.create(metricName, labels, new BigDecimal(value)));
    }
    return Optional.empty();
  }
@Test
  void test() {
    String metricsString =
        "kafka_server_BrokerTopicMetrics_FifteenMinuteRate"
            + "{name=\"BytesOutPerSec\",topic=\"__confluent.support.metrics\",} 123.1234";

    Optional<RawMetric> parsedOpt = PrometheusEndpointMetricsParser.parse(metricsString);

    assertThat(parsedOpt).hasValueSatisfying(metric -> {
      assertThat(metric.name()).isEqualTo("kafka_server_BrokerTopicMetrics_FifteenMinuteRate");
      assertThat(metric.value()).isEqualTo("123.1234");
      assertThat(metric.labels()).containsExactlyEntriesOf(
          Map.of(
              "name", "BytesOutPerSec",
              "topic", "__confluent.support.metrics"
          ));
    });
  }