[강운덕] [LUCYSUS-1744] thrift의 span의 parentSpanId를 optional로 변경하고 root가 아닐때만 데이터를 쓰게함.

git-svn-id: http://svn.bds.nhncorp.com/pe/hippo-tomcat-profiler/trunk@1213 84d0f5b1-2673-498c-a247-62c4ff18d310
This commit is contained in:
Woonduk Kang
2013-02-18 02:37:41 +00:00
parent e98453e3de
commit 586b45fdad
+5 -2
View File
@@ -116,7 +116,7 @@ public class Span implements Thriftable {
}
public String toString() {
StringBuilder sb = new StringBuilder();
StringBuilder sb = new StringBuilder(128);
sb.append("{");
sb.append("\n\t TraceID = ").append(traceID);
@@ -153,7 +153,10 @@ public class Span implements Thriftable {
span.setServiceName(serviceName);
span.setServiceType(serviceType.getCode());
span.setSpanId(traceID.getSpanId());
span.setParentSpanId(traceID.getParentSpanId());
final int parentSpanId = traceID.getParentSpanId();
if (parentSpanId != SpanID.NULL) {
span.setParentSpanId(parentSpanId);
}
span.setEndPoint(endPoint);
span.setRemoteAddr(remoteAddr);
if (exception != 0) {