[유치수] [NOBTS] thrift

git-svn-id: http://svn.bds.nhncorp.com/pe/hippo-tomcat-profiler/trunk@572 84d0f5b1-2673-498c-a247-62c4ff18d310
This commit is contained in:
Chisu Yu
2012-09-04 08:37:38 +00:00
parent 98a3f71464
commit a57e2ab393
13 changed files with 565 additions and 634 deletions
@@ -3,6 +3,7 @@ package com.profiler.context;
import java.util.logging.Level;
import java.util.logging.Logger;
import com.profiler.sender.DataSender;
import com.profiler.util.NamedThreadLocal;
/**
@@ -80,6 +81,8 @@ public final class Trace {
try {
// TODO: send span to server
System.out.println("\n\nWrite span hash=" + span.hashCode() + ", value=" + span + ", spanMap.size=" + spanMap.size() + ", threadid=" + Thread.currentThread().getId() + "\n\n");
DataSender.getInstance().addDataToSend(span.toThrift());
} catch (Exception e) {
e.printStackTrace();
logger.log(Level.SEVERE, e.getMessage());
@@ -108,7 +111,7 @@ public final class Trace {
mutate(getTraceId(), new SpanUpdater() {
@Override
public Span updateSpan(Span span) {
span.addAnnotation(new HippoBinaryAnnotation(System.currentTimeMillis(), key, value, null));
span.addAnnotation(new HippoBinaryAnnotation(System.currentTimeMillis(), key, value));
return span;
}
});