mirror of
https://github.com/wahyd4/pinpoint.git
synced 2026-08-22 11:16:25 +10:00
[강운덕] [LUCYSUS-1744] profiler에서 수집 데이터를 일정량 모아서 한번에 flush하는 로직 개발.
git-svn-id: http://svn.bds.nhncorp.com/pe/hippo-tomcat-profiler/trunk@1035 84d0f5b1-2673-498c-a247-62c4ff18d310
This commit is contained in:
@@ -34,7 +34,7 @@ public class SubSpan implements Thriftable {
|
||||
return parentSpan;
|
||||
}
|
||||
|
||||
public int getSequence() {
|
||||
public short getSequence() {
|
||||
return sequence;
|
||||
}
|
||||
|
||||
@@ -46,6 +46,10 @@ public class SubSpan implements Thriftable {
|
||||
return annotations.add(annotation);
|
||||
}
|
||||
|
||||
public List<HippoAnnotation> getAnnotations() {
|
||||
return annotations;
|
||||
}
|
||||
|
||||
public int getAnnotationSize() {
|
||||
return annotations.size();
|
||||
}
|
||||
@@ -123,21 +127,31 @@ public class SubSpan implements Thriftable {
|
||||
}
|
||||
|
||||
public com.profiler.common.dto.thrift.SubSpan toThrift() {
|
||||
return toThrift(false);
|
||||
}
|
||||
|
||||
public com.profiler.common.dto.thrift.SubSpan toThrift(boolean child) {
|
||||
com.profiler.common.dto.thrift.SubSpan span = new com.profiler.common.dto.thrift.SubSpan();
|
||||
|
||||
span.setAgentId(Agent.getInstance().getAgentId());
|
||||
|
||||
long parentSpanStartTime = parentSpan.getStartTime();
|
||||
span.setStartElapsed((int) (startTime - parentSpanStartTime));
|
||||
span.setEndElapsed((int) (endTime - startTime));
|
||||
TraceID parentSpanTraceID = parentSpan.getTraceID();
|
||||
span.setMostTraceId(parentSpanTraceID.getId().getMostSignificantBits());
|
||||
span.setLeastTraceId(parentSpanTraceID.getId().getLeastSignificantBits());
|
||||
|
||||
// 다른 span의 sub로 들어가지 않을 경우
|
||||
if (!child) {
|
||||
span.setAgentId(Agent.getInstance().getAgentId());
|
||||
TraceID parentSpanTraceID = parentSpan.getTraceID();
|
||||
span.setMostTraceId(parentSpanTraceID.getId().getMostSignificantBits());
|
||||
span.setLeastTraceId(parentSpanTraceID.getId().getLeastSignificantBits());
|
||||
span.setSpanId(parentSpanTraceID.getSpanId());
|
||||
span.setSequence(sequence);
|
||||
}
|
||||
|
||||
span.setRpc(rpc);
|
||||
span.setServiceName(serviceName);
|
||||
span.setServiceType(serviceType.getCode());
|
||||
|
||||
span.setSpanId(parentSpanTraceID.getSpanId());
|
||||
span.setSequence(sequence);
|
||||
|
||||
span.setEndPoint(endPoint);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user