[유치수] [NOBTS] add terminal info, change dbtype to servicetype

git-svn-id: http://svn.bds.nhncorp.com/pe/hippo-tomcat-profiler/trunk@918 84d0f5b1-2673-498c-a247-62c4ff18d310
This commit is contained in:
Chisu Yu
2012-11-27 02:10:47 +00:00
parent 82fd698af6
commit 651323af36
17 changed files with 90 additions and 89 deletions
@@ -4,6 +4,7 @@ import java.util.ArrayList;
import java.util.List;
import com.profiler.Agent;
import com.profiler.common.ServiceType;
/**
* Span represent RPC
@@ -17,6 +18,7 @@ public class Span implements Thriftable {
private long endTime;
private String serviceName;
private String rpc;
private ServiceType serviceType;
private String endPoint;
private boolean isTerminal = false;
@@ -86,6 +88,14 @@ public class Span implements Thriftable {
return endTime;
}
public ServiceType getServiceType() {
return serviceType;
}
public void setServiceType(ServiceType serviceType) {
this.serviceType = serviceType;
}
public String toString() {
StringBuilder sb = new StringBuilder();
@@ -95,6 +105,7 @@ public class Span implements Thriftable {
sb.append(", EndTime = ").append(endTime);
sb.append(",\n\t Name = ").append(rpc);
sb.append(", ServiceName = ").append(serviceName);
sb.append(", ServiceType = ").append(serviceType);
sb.append(", EndPoint = ").append(endPoint);
sb.append(",\n\t Annotations = {");
@@ -118,6 +129,7 @@ public class Span implements Thriftable {
span.setLeastTraceId(traceID.getId().getLeastSignificantBits());
span.setRpc(rpc);
span.setServiceName(serviceName);
span.setServiceType(serviceType.getCode());
span.setSpanId(traceID.getSpanId());
span.setParentSpanId(traceID.getParentSpanId());
span.setEndPoint(endPoint);