提交 b91d681d 编写于 作者: A ascrutae

修复部分问题

上级 038811a1
......@@ -14,4 +14,17 @@ public class TraceIdUtil {
return traceIdBuilder.substring(0, traceIdBuilder.length() - 1).toString();
}
public static TraceId toTraceId(String traceId) {
String[] traceIdSegment = traceId.split("\\.");
TraceId.Builder builder = TraceId.newBuilder();
for (String segment : traceIdSegment) {
builder = builder.addSegments(Long.parseLong(segment));
}
return builder.build();
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册