Search in sources :

Example 61 with SpanEventBo

use of com.navercorp.pinpoint.common.server.bo.SpanEventBo in project pinpoint by naver.

the class SpanFactory method buildSpanEventBoList.

private List<SpanEventBo> buildSpanEventBoList(List<TSpanEvent> spanEventList) {
    if (CollectionUtils.isEmpty(spanEventList)) {
        return new ArrayList<>();
    }
    List<SpanEventBo> spanEventBoList = new ArrayList<>(spanEventList.size());
    for (TSpanEvent tSpanEvent : spanEventList) {
        final SpanEventBo spanEventBo = buildSpanEventBo(tSpanEvent);
        if (!spanEventFilter.filter(spanEventBo)) {
            continue;
        }
        spanEventBoList.add(spanEventBo);
    }
    spanEventBoList.sort(SpanEventComparator.INSTANCE);
    return spanEventBoList;
}
Also used : ArrayList(java.util.ArrayList) TSpanEvent(com.navercorp.pinpoint.thrift.dto.TSpanEvent) SpanEventBo(com.navercorp.pinpoint.common.server.bo.SpanEventBo)

Example 62 with SpanEventBo

use of com.navercorp.pinpoint.common.server.bo.SpanEventBo in project pinpoint by naver.

the class SpanFactory method buildSpanChunkBo.

public SpanChunkBo buildSpanChunkBo(TSpanChunk tSpanChunk) {
    final SpanChunkBo spanChunkBo = newSpanChunkBo(tSpanChunk);
    final LocalAsyncIdBo localAsyncIdBo = getLocalAsyncId(tSpanChunk);
    if (localAsyncIdBo != null) {
        spanChunkBo.setLocalAsyncId(localAsyncIdBo);
    }
    List<TSpanEvent> spanEventList = tSpanChunk.getSpanEventList();
    List<SpanEventBo> spanEventBoList = buildSpanEventBoList(spanEventList);
    spanChunkBo.addSpanEventBoList(spanEventBoList);
    long acceptedTime = acceptedTimeService.getAcceptedTime();
    spanChunkBo.setCollectorAcceptTime(acceptedTime);
    return spanChunkBo;
}
Also used : SpanChunkBo(com.navercorp.pinpoint.common.server.bo.SpanChunkBo) LocalAsyncIdBo(com.navercorp.pinpoint.common.server.bo.LocalAsyncIdBo) TSpanEvent(com.navercorp.pinpoint.thrift.dto.TSpanEvent) SpanEventBo(com.navercorp.pinpoint.common.server.bo.SpanEventBo)

Example 63 with SpanEventBo

use of com.navercorp.pinpoint.common.server.bo.SpanEventBo in project pinpoint by naver.

the class SpanFactory method buildSpanEventBo.

// for test
public SpanEventBo buildSpanEventBo(TSpanEvent tSpanEvent) {
    Objects.requireNonNull(tSpanEvent, "tSpanEvent");
    final SpanEventBo spanEvent = new SpanEventBo();
    bind(spanEvent, tSpanEvent);
    return spanEvent;
}
Also used : SpanEventBo(com.navercorp.pinpoint.common.server.bo.SpanEventBo)

Example 64 with SpanEventBo

use of com.navercorp.pinpoint.common.server.bo.SpanEventBo in project pinpoint by naver.

the class SpanFactory method buildSpanBo.

public SpanBo buildSpanBo(TSpan tSpan) {
    final SpanBo spanBo = newSpanBo(tSpan);
    List<TSpanEvent> spanEventList = tSpan.getSpanEventList();
    List<SpanEventBo> spanEventBoList = buildSpanEventBoList(spanEventList);
    spanBo.addSpanEventBoList(spanEventBoList);
    long acceptedTime = acceptedTimeService.getAcceptedTime();
    spanBo.setCollectorAcceptTime(acceptedTime);
    return spanBo;
}
Also used : SpanBo(com.navercorp.pinpoint.common.server.bo.SpanBo) TSpanEvent(com.navercorp.pinpoint.thrift.dto.TSpanEvent) SpanEventBo(com.navercorp.pinpoint.common.server.bo.SpanEventBo)

Example 65 with SpanEventBo

use of com.navercorp.pinpoint.common.server.bo.SpanEventBo in project pinpoint by naver.

the class CollectorGrpcSpanFactory method buildSpanBo.

@Override
public SpanBo buildSpanBo(PSpan pSpan, Header header) {
    final SpanBo spanBo = this.grpcBinder.bindSpanBo(pSpan, header);
    final long acceptedTime = acceptedTimeService.getAcceptedTime();
    spanBo.setCollectorAcceptTime(acceptedTime);
    final List<PSpanEvent> pSpanEventList = pSpan.getSpanEventList();
    List<SpanEventBo> spanEventBos = buildSpanEventBoList(pSpanEventList);
    spanBo.addSpanEventBoList(spanEventBos);
    return spanBo;
}
Also used : PSpanEvent(com.navercorp.pinpoint.grpc.trace.PSpanEvent) SpanBo(com.navercorp.pinpoint.common.server.bo.SpanBo) SpanEventBo(com.navercorp.pinpoint.common.server.bo.SpanEventBo)

Aggregations

SpanEventBo (com.navercorp.pinpoint.common.server.bo.SpanEventBo)94 Test (org.junit.Test)39 SpanBo (com.navercorp.pinpoint.common.server.bo.SpanBo)26 AnnotationBo (com.navercorp.pinpoint.common.server.bo.AnnotationBo)14 SpanChunkBo (com.navercorp.pinpoint.common.server.bo.SpanChunkBo)13 ServiceType (com.navercorp.pinpoint.common.trace.ServiceType)11 ArrayList (java.util.ArrayList)11 Buffer (com.navercorp.pinpoint.common.buffer.Buffer)9 ByteBuffer (java.nio.ByteBuffer)8 AutomaticBuffer (com.navercorp.pinpoint.common.buffer.AutomaticBuffer)4 LocalAsyncIdBo (com.navercorp.pinpoint.common.server.bo.LocalAsyncIdBo)4 Header (com.navercorp.pinpoint.grpc.Header)4 PSpanChunk (com.navercorp.pinpoint.grpc.trace.PSpanChunk)4 TSpanEvent (com.navercorp.pinpoint.thrift.dto.TSpanEvent)4 SpanAcceptor (com.navercorp.pinpoint.web.filter.visitor.SpanAcceptor)4 SpanEventVisitor (com.navercorp.pinpoint.web.filter.visitor.SpanEventVisitor)4 SpanReader (com.navercorp.pinpoint.web.filter.visitor.SpanReader)4 OffsetFixedBuffer (com.navercorp.pinpoint.common.buffer.OffsetFixedBuffer)3 SpanBitFiled (com.navercorp.pinpoint.common.server.bo.serializer.trace.v2.bitfield.SpanBitFiled)3 PSpanEvent (com.navercorp.pinpoint.grpc.trace.PSpanEvent)3