Search in sources :

Example 26 with TSpanChunk

use of com.navercorp.pinpoint.thrift.dto.TSpanChunk in project pinpoint by naver.

the class SpanPostProcessorTest method postProcess2.

@Test
public void postProcess2() {
    SpanProcessor<TSpan, TSpanChunk> spanChunkPostProcessor = new SpanProcessorV1();
    TraceRoot internalTraceId = newInternalTraceId();
    List<TSpanEvent> tSpanEvents = new ArrayList<TSpanEvent>();
    TSpanChunk tSpanChunk = new TSpanChunk();
    tSpanChunk.setSpanEventList(tSpanEvents);
    List<SpanEvent> spanEvents = new ArrayList<SpanEvent>();
    SpanChunk spanChunk = new DefaultSpanChunk(internalTraceId, spanEvents);
    // one spanEvent
    addSpanEvent(tSpanEvents, spanEvents);
    spanChunkPostProcessor.postProcess(spanChunk, tSpanChunk);
    // two spanEvent
    addSpanEvent(tSpanEvents, spanEvents);
    spanChunkPostProcessor.postProcess(spanChunk, tSpanChunk);
    // three
    addSpanEvent(tSpanEvents, spanEvents);
    spanChunkPostProcessor.postProcess(spanChunk, tSpanChunk);
}
Also used : TSpanChunk(com.navercorp.pinpoint.thrift.dto.TSpanChunk) DefaultSpanChunk(com.navercorp.pinpoint.profiler.context.DefaultSpanChunk) SpanChunk(com.navercorp.pinpoint.profiler.context.SpanChunk) TSpanChunk(com.navercorp.pinpoint.thrift.dto.TSpanChunk) ArrayList(java.util.ArrayList) SpanEvent(com.navercorp.pinpoint.profiler.context.SpanEvent) TSpanEvent(com.navercorp.pinpoint.thrift.dto.TSpanEvent) TSpan(com.navercorp.pinpoint.thrift.dto.TSpan) DefaultTraceRoot(com.navercorp.pinpoint.profiler.context.id.DefaultTraceRoot) TraceRoot(com.navercorp.pinpoint.profiler.context.id.TraceRoot) TSpanEvent(com.navercorp.pinpoint.thrift.dto.TSpanEvent) DefaultSpanChunk(com.navercorp.pinpoint.profiler.context.DefaultSpanChunk) Test(org.junit.Test)

Aggregations

TSpanChunk (com.navercorp.pinpoint.thrift.dto.TSpanChunk)26 TSpanEvent (com.navercorp.pinpoint.thrift.dto.TSpanEvent)14 Test (org.junit.Test)13 TSpan (com.navercorp.pinpoint.thrift.dto.TSpan)5 SpanChunk (com.navercorp.pinpoint.profiler.context.SpanChunk)4 TraceRoot (com.navercorp.pinpoint.profiler.context.id.TraceRoot)4 DefaultSpanChunk (com.navercorp.pinpoint.profiler.context.DefaultSpanChunk)3 SpanEvent (com.navercorp.pinpoint.profiler.context.SpanEvent)3 DefaultTraceRoot (com.navercorp.pinpoint.profiler.context.id.DefaultTraceRoot)3 LocalAsyncIdBo (com.navercorp.pinpoint.common.server.bo.LocalAsyncIdBo)2 SpanChunkBo (com.navercorp.pinpoint.common.server.bo.SpanChunkBo)2 ArrayList (java.util.ArrayList)2 TBase (org.apache.thrift.TBase)2 TypeLiteral (com.google.inject.TypeLiteral)1 TraceId (com.navercorp.pinpoint.bootstrap.context.TraceId)1 VisibleForTesting (com.navercorp.pinpoint.common.annotations.VisibleForTesting)1 Message (com.navercorp.pinpoint.io.request.Message)1 AsyncSpanChunk (com.navercorp.pinpoint.profiler.context.AsyncSpanChunk)1 LocalAsyncId (com.navercorp.pinpoint.profiler.context.LocalAsyncId)1 SpanType (com.navercorp.pinpoint.profiler.context.SpanType)1