@Test public void metricNameConversion() { assertEquals("FRAG3", getOpenMetricsMetricName("FRAG3")); assertEquals("UNICAST3", getOpenMetricsMetricName("UNICAST3")); assertEquals("FOO_BAR", getOpenMetricsMetricName("FOO-BAR")); assertEquals("FooBAR", getOpenMetricsMetricName("FooBAR")); assertEquals("FooBar", getOpenMetricsMetricName("FooBar")); assertEquals("a_a", getOpenMetricsMetricName("a__a")); assertEquals("fooBar_blaBla", getOpenMetricsMetricName("fooBar_blaBla")); }
static String getOpenMetricsMetricName(String name) { String out = name; out = out.replace("__", USCORE); out = out.replaceAll("[^\\w]", USCORE); return out; }
OpenMetricsExporter implements Exporter { static String getOpenMetricsMetricName(String name) { String out = name; out = out.replace("__", USCORE); out = out.replaceAll("[^\\w]", USCORE); return out; } }
OpenMetricsExporter implements Exporter { static String getOpenMetricsMetricName(String name) { String out = name; out = out.replace("__", USCORE); out = out.replaceAll("[^\\w]", USCORE); return out; } OpenMetricsExporter(); }
OpenMetricsExporter implements Exporter { static String getOpenMetricsMetricName(String name) { String out = name; out = out.replace("__", USCORE); out = out.replaceAll("[^\\w]", USCORE); return out; } OpenMetricsExporter(); @Override StringBuilder exportOneScope(MetricRegistry.Type scope); @Override StringBuilder exportAllScopes(); @Override StringBuilder exportOneMetric(MetricRegistry.Type scope, MetricID metricID); @Override StringBuilder exportMetricsByName(MetricRegistry.Type scope, String name); @Override String getContentType(); static String quoteHelpText(String value); static String quoteValue(String value); }
OpenMetricsExporter implements Exporter { static String getOpenMetricsMetricName(String name) { String out = name; out = out.replace("__", USCORE); out = out.replaceAll("[^\\w]", USCORE); return out; } OpenMetricsExporter(); @Override StringBuilder exportOneScope(MetricRegistry.Type scope); @Override StringBuilder exportAllScopes(); @Override StringBuilder exportOneMetric(MetricRegistry.Type scope, MetricID metricID); @Override StringBuilder exportMetricsByName(MetricRegistry.Type scope, String name); @Override String getContentType(); static String quoteHelpText(String value); static String quoteValue(String value); static final String SMALLRYE_METRICS_USE_PREFIX_FOR_SCOPE; }