@Test public void mapTagNames_matching() { assertThat(DataProxy.mapTagNames(pack, "tag1"), is("tv1")); assertThat(DataProxy.mapTagNames(pack, "tag2"), is("tv2")); assertThat(DataProxy.mapTagNames(pack, "tag1,tag2"), is("tv1,tv2")); assertThat(DataProxy.mapTagNames(pack, "tagX,tag1,tag2"), is("tv1,tv2")); assertThat(DataProxy.mapTagNames(pack, "tagX,tag1,tagX,tag2"), is("tv1,tv2")); assertThat(DataProxy.mapTagNames(pack, "tagX,tag1,tagX,tag2,tag3,tagX"), is("tv1,tv2,tv3")); }
protected static String mapTagNames(SpanPack pack, String tagNames) { if (StringUtil.isEmpty(tagNames)) { return null; } return Arrays.stream(tagNames.split(",")) .map(tag -> pack.tags.getText(tag)) .filter(StringUtil::isNotEmpty) .collect(Collectors.joining(",")); }
DataProxy { protected static String mapTagNames(SpanPack pack, String tagNames) { if (StringUtil.isEmpty(tagNames)) { return null; } return Arrays.stream(tagNames.split(",")) .map(tag -> pack.tags.getText(tag)) .filter(StringUtil::isNotEmpty) .collect(Collectors.joining(",")); } }
DataProxy { protected static String mapTagNames(SpanPack pack, String tagNames) { if (StringUtil.isEmpty(tagNames)) { return null; } return Arrays.stream(tagNames.split(",")) .map(tag -> pack.tags.getText(tag)) .filter(StringUtil::isNotEmpty) .collect(Collectors.joining(",")); }  }
DataProxy { protected static String mapTagNames(SpanPack pack, String tagNames) { if (StringUtil.isEmpty(tagNames)) { return null; } return Arrays.stream(tagNames.split(",")) .map(tag -> pack.tags.getText(tag)) .filter(StringUtil::isNotEmpty) .collect(Collectors.joining(",")); }  static int sendSqlText(String sql); static int sendServiceName(String service); static void sendServiceName(int hash, String service); static int sendDesc(String desc); static int sendLogin(String loginName); static void registerZipkinObj(Span span, ScouterConfig conf); static void sendHeartBeat(ObjectPack p); static int sendObjName(String objName); static void sendObjName(int hash, String objName); static int sendError(String message); static int sendHashedMessage(String text); static void reset(); static void sendXLog(XLogPack p); static void sendDirect(Pack p); static void sendSpanContainer(final List<Span> spans, final ScouterConfig conf); static XLogPack makeXLogPack(SpanPack pack, ScouterConfig conf); }
DataProxy { protected static String mapTagNames(SpanPack pack, String tagNames) { if (StringUtil.isEmpty(tagNames)) { return null; } return Arrays.stream(tagNames.split(",")) .map(tag -> pack.tags.getText(tag)) .filter(StringUtil::isNotEmpty) .collect(Collectors.joining(",")); }  static int sendSqlText(String sql); static int sendServiceName(String service); static void sendServiceName(int hash, String service); static int sendDesc(String desc); static int sendLogin(String loginName); static void registerZipkinObj(Span span, ScouterConfig conf); static void sendHeartBeat(ObjectPack p); static int sendObjName(String objName); static void sendObjName(int hash, String objName); static int sendError(String message); static int sendHashedMessage(String text); static void reset(); static void sendXLog(XLogPack p); static void sendDirect(Pack p); static void sendSpanContainer(final List<Span> spans, final ScouterConfig conf); static XLogPack makeXLogPack(SpanPack pack, ScouterConfig conf);  }