[유치수] [NOBTS] remote addr 수집 기능 추가.

git-svn-id: http://svn.bds.nhncorp.com/pe/hippo-tomcat-profiler/trunk@1187 84d0f5b1-2673-498c-a247-62c4ff18d310
This commit is contained in:
Chisu Yu
2013-02-13 08:03:53 +00:00
parent 1242b409e5
commit a908485277
3 changed files with 28 additions and 6 deletions
+13 -2
View File
@@ -21,6 +21,7 @@ public class Span implements Thriftable {
private ServiceType serviceType;
private String endPoint;
private int exception;
private String remoteAddr;
private final List<Annotation> annotations = new ArrayList<Annotation>(5);
@@ -103,11 +104,19 @@ public class Span implements Thriftable {
}
public void setException(int exception) {
this.exception = exception;
this.exception = exception;
}
public String getRemoteAddr() {
return remoteAddr;
}
public void setRemoteAddr(String remoteAddr) {
this.remoteAddr = remoteAddr;
}
public String toString() {
StringBuilder sb = new StringBuilder();
StringBuilder sb = new StringBuilder();
sb.append("{");
sb.append("\n\t TraceID = ").append(traceID);
@@ -118,6 +127,7 @@ public class Span implements Thriftable {
sb.append(", ServiceType = ").append(serviceType);
sb.append(", EndPoint = ").append(endPoint);
sb.append(", Exception = ").append(exception);
sb.append(", RemoteAddr = ").append(remoteAddr);
sb.append(",\n\t Annotations = {");
for (Annotation a : annotations) {
sb.append("\n\t\t").append(a);
@@ -145,6 +155,7 @@ public class Span implements Thriftable {
span.setSpanId(traceID.getSpanId());
span.setParentSpanId(traceID.getParentSpanId());
span.setEndPoint(endPoint);
span.setRemoteAddr(remoteAddr);
if (exception != 0) {
span.setErr(exception);
}