mirror of
https://github.com/wahyd4/pinpoint.git
synced 2026-08-21 10:45:59 +10:00
[강운덕] [LUCYSUS-1744]SubSpanList의 클래명이 직관적이지 않아 SpanChunk로 변경함
git-svn-id: http://svn.bds.nhncorp.com/pe/hippo-tomcat-profiler/trunk@1264 84d0f5b1-2673-498c-a247-62c4ff18d310
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package com.profiler.context;
|
||||
|
||||
import com.profiler.Agent;
|
||||
import com.profiler.common.dto.thrift.SpanChunk;
|
||||
import org.apache.thrift.TBase;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -20,23 +21,23 @@ public class SubSpanList implements Thriftable {
|
||||
|
||||
@Override
|
||||
public TBase toThrift() {
|
||||
com.profiler.common.dto.thrift.SubSpanList tSubSpanList = new com.profiler.common.dto.thrift.SubSpanList();
|
||||
SpanChunk tSpanChunk = new SpanChunk();
|
||||
// TODO 반드시 1개 이상이라는 조건을 충족해야 된다.
|
||||
SubSpan first = subSpanList.get(0);
|
||||
Span parentSpan = first.getParentSpan();
|
||||
tSubSpanList.setAgentId(Agent.getInstance().getAgentId());
|
||||
tSubSpanList.setAgentIdentifier(Agent.getInstance().getIdentifier());
|
||||
tSpanChunk.setAgentId(Agent.getInstance().getAgentId());
|
||||
tSpanChunk.setAgentIdentifier(Agent.getInstance().getIdentifier());
|
||||
|
||||
UUID id = parentSpan.getTraceID().getId();
|
||||
tSubSpanList.setMostTraceId(id.getMostSignificantBits());
|
||||
tSubSpanList.setLeastTraceId(id.getLeastSignificantBits());
|
||||
tSubSpanList.setSpanId(parentSpan.getTraceID().getSpanId());
|
||||
tSpanChunk.setMostTraceId(id.getMostSignificantBits());
|
||||
tSpanChunk.setLeastTraceId(id.getLeastSignificantBits());
|
||||
tSpanChunk.setSpanId(parentSpan.getTraceID().getSpanId());
|
||||
|
||||
List<com.profiler.common.dto.thrift.SubSpan> tSubSpan = createSubSpan(subSpanList);
|
||||
|
||||
tSubSpanList.setSubSpanList(tSubSpan);
|
||||
tSpanChunk.setSubSpanList(tSubSpan);
|
||||
|
||||
return tSubSpanList;
|
||||
return tSpanChunk;
|
||||
}
|
||||
|
||||
private List<com.profiler.common.dto.thrift.SubSpan> createSubSpan(List<SubSpan> subSpanList) {
|
||||
|
||||
Reference in New Issue
Block a user