@Test void testPrometheusName() { assertAll("Various name transformations based on the 3.2.1 section of the spec", () -> assertThat(impl.prometheusName("theName"), is("base_theName")), () -> assertThat(impl.prometheusName("a.b.c.d"), is("base_a_b_c_d")), () -> assertThat(impl.prometheusName("a b c d"), is("base_a_b_c_d")), () -> assertThat(impl.prometheusName("a-b-c-d"), is("base_a_b_c_d")), () -> assertThat(impl.prometheusName("a2.b.cC.d"), is("base_a2_b_cC_d")), () -> assertThat(impl.prometheusName("a:b.c.d"), is("base_a_b_c_d")), () -> assertThat(impl.prometheusName("a .b..c_.d"), is("base_a_b_c_d")), () -> assertThat(impl.prometheusName("_aB..c_.d"), is("base_aB_c_d"))); }
final String prometheusName(String name) { return prometheusClean(name, registryType + "_"); }
MetricImpl implements HelidonMetric { final String prometheusName(String name) { return prometheusClean(name, registryType + "_"); } }
MetricImpl implements HelidonMetric { final String prometheusName(String name) { return prometheusClean(name, registryType + "_"); } MetricImpl(String registryType, Metadata metadata); }
MetricImpl implements HelidonMetric { final String prometheusName(String name) { return prometheusClean(name, registryType + "_"); } MetricImpl(String registryType, Metadata metadata); @Override String getName(); @Override Metadata metadata(); @Override String toString(); @Override void jsonMeta(JsonObjectBuilder builder, List<MetricID> metricIDs); @Override void prometheusData(StringBuilder sb, MetricID metricID, boolean withHelpType); @Override String prometheusNameWithUnits(MetricID metricID); abstract String prometheusValue(); }
MetricImpl implements HelidonMetric { final String prometheusName(String name) { return prometheusClean(name, registryType + "_"); } MetricImpl(String registryType, Metadata metadata); @Override String getName(); @Override Metadata metadata(); @Override String toString(); @Override void jsonMeta(JsonObjectBuilder builder, List<MetricID> metricIDs); @Override void prometheusData(StringBuilder sb, MetricID metricID, boolean withHelpType); @Override String prometheusNameWithUnits(MetricID metricID); abstract String prometheusValue();  }