use of com.navercorp.pinpoint.common.server.bo.SpanChunkBo in project pinpoint by naver.
the class GrpcSpanChunkHandler method handleSpanChunk.
private void handleSpanChunk(PSpanChunk spanChunk) {
if (isDebug) {
logger.debug("Handle PSpanChunk={}", createSimpleSpanChunkLog(spanChunk));
}
try {
final Header agentInfo = ServerContext.getAgentInfo();
final SpanChunkBo spanChunkBo = spanFactory.buildSpanChunkBo(spanChunk, agentInfo);
this.traceService.insertSpanChunk(spanChunkBo);
} catch (Exception e) {
logger.warn("Failed to handle spanChunk={}", MessageFormatUtils.debugLog(spanChunk), e);
}
}
use of com.navercorp.pinpoint.common.server.bo.SpanChunkBo in project pinpoint by naver.
the class ThriftSpanChunkHandler method handleSpanChunk.
private void handleSpanChunk(TSpanChunk tbase) {
try {
final SpanChunkBo spanChunkBo = this.spanFactory.buildSpanChunkBo(tbase);
this.traceService.insertSpanChunk(spanChunkBo);
} catch (Exception e) {
logger.warn("Failed to handle SpanChunk={}, Caused={}", tbase, e.getMessage(), e);
}
}
use of com.navercorp.pinpoint.common.server.bo.SpanChunkBo in project pinpoint by naver.
the class CollectorGrpcSpanFactoryTest method buildSpanChunkBo_first_depth_zero.
@Test
public void buildSpanChunkBo_first_depth_zero() {
final PSpanChunk chunk = newSpanChunk_first_depth_zero();
final Header header = newHeader();
SpanChunkBo spanChunkBo = factory.buildSpanChunkBo(chunk, header);
List<SpanEventBo> spanEventBoList = spanChunkBo.getSpanEventBoList();
SpanEventBo spanEventBo0 = spanEventBoList.get(0);
SpanEventBo spanEventBo1 = spanEventBoList.get(1);
Assert.assertEquals(0, spanEventBo0.getDepth());
Assert.assertEquals(1, spanEventBo1.getDepth());
}
use of com.navercorp.pinpoint.common.server.bo.SpanChunkBo in project pinpoint by naver.
the class CollectorGrpcSpanFactoryTest method buildSpanChunkBo_compact_depth_NPE.
@Test
public void buildSpanChunkBo_compact_depth_NPE() {
final PSpanChunk chunk = newSpanChunk_compact_depth_error();
final Header header = newHeader();
SpanChunkBo spanChunkBo = factory.buildSpanChunkBo(chunk, header);
List<SpanEventBo> spanEventBoList = spanChunkBo.getSpanEventBoList();
SpanEventBo spanEventBo0 = spanEventBoList.get(0);
Assert.assertEquals(1, spanEventBo0.getDepth());
}
use of com.navercorp.pinpoint.common.server.bo.SpanChunkBo in project pinpoint by naver.
the class SpanEncoderTest method testEncodeSpanColumnValue_simpleSpanChunk.
@Test
public void testEncodeSpanColumnValue_simpleSpanChunk() throws Exception {
SpanChunkBo spanChunkBo = randomSpanChunk();
assertSpanChunk(spanChunkBo);
}
Aggregations