@Test public void testEncodeForGraphite() throws Exception { Assert.assertEquals("GET-|index:html", GraphiteSanitizer.sanitizeGraphiteMetricSegment("GET /index.html")); }
public static String sanitizeGraphiteMetricSegment(String metricNameSegment) { return DISALLOWED_CHARS.matcher(metricNameSegment .replace('.', ':') .replace(' ', '-') .replace('/', '|') .replace('\\', '|')) .replaceAll("_"); }
GraphiteSanitizer { public static String sanitizeGraphiteMetricSegment(String metricNameSegment) { return DISALLOWED_CHARS.matcher(metricNameSegment .replace('.', ':') .replace(' ', '-') .replace('/', '|') .replace('\\', '|')) .replaceAll("_"); } }
GraphiteSanitizer { public static String sanitizeGraphiteMetricSegment(String metricNameSegment) { return DISALLOWED_CHARS.matcher(metricNameSegment .replace('.', ':') .replace(' ', '-') .replace('/', '|') .replace('\\', '|')) .replaceAll("_"); } private  GraphiteSanitizer(); }
GraphiteSanitizer { public static String sanitizeGraphiteMetricSegment(String metricNameSegment) { return DISALLOWED_CHARS.matcher(metricNameSegment .replace('.', ':') .replace(' ', '-') .replace('/', '|') .replace('\\', '|')) .replaceAll("_"); } private  GraphiteSanitizer(); static String sanitizeGraphiteMetricSegment(String metricNameSegment); }
GraphiteSanitizer { public static String sanitizeGraphiteMetricSegment(String metricNameSegment) { return DISALLOWED_CHARS.matcher(metricNameSegment .replace('.', ':') .replace(' ', '-') .replace('/', '|') .replace('\\', '|')) .replaceAll("_"); } private  GraphiteSanitizer(); static String sanitizeGraphiteMetricSegment(String metricNameSegment); static final Pattern DISALLOWED_CHARS; }