private static Pair processAttribute(String s, String s1) { String s2 = StringUtil.clipString(s, 50, false); if (s2.length() < s.length()) { logger.devw("The attribute key has been trimmed to a length of 50 characters"); } s = StringUtil.clipString(s1, 1000, false); if (s.length() < s1.length()) { logger.devw("The attribute value has been trimmed to a length of 1000 characters"); } return new Pair(s2, s); }
private static Pair processMetric(String s, Number number) { String s1 = StringUtil.clipString(s, 50, false); if (s1.length() < s.length()) { logger.devw("The metric key has been trimmed to a length of 50 characters"); } return new Pair(s1, number); }