use of com.navercorp.pinpoint.common.server.bo.SpanBo in project pinpoint by naver.
the class SpanSerializerV2 method serialize.
@Override
public void serialize(SpanBo spanBo, Put put, SerializationContext context) {
final SpanEncodingContext<SpanBo> encodingContext = new SpanEncodingContext<SpanBo>(spanBo);
ByteBuffer qualifier = spanEncoder.encodeSpanQualifier(encodingContext);
ByteBuffer columnValue = spanEncoder.encodeSpanColumnValue(encodingContext);
long acceptedTime = put.getTimeStamp();
put.addColumn(TRACE_V2_CF_SPAN, qualifier, acceptedTime, columnValue);
}
use of com.navercorp.pinpoint.common.server.bo.SpanBo in project pinpoint by naver.
the class SpanDecoder method decodeSpanBo.
public SpanBo decodeSpanBo(Buffer qualifier, Buffer valueBuffer, SpanDecodingContext decodingContext) {
TransactionId transactionId = decodingContext.getTransactionId();
SpanBo spanBo = new SpanBo();
spanBo.setTransactionId(transactionId);
long spanId = qualifier.readLong();
spanBo.setSpanId(spanId);
spanBo.setCollectorAcceptTime(decodingContext.getCollectorAcceptedTime());
readSpan(spanBo, valueBuffer);
if (logger.isDebugEnabled()) {
logger.debug("read span :{}", spanBo);
}
return spanBo;
}
use of com.navercorp.pinpoint.common.server.bo.SpanBo in project pinpoint by naver.
the class AcceptUrlFilterTest method acceptTest_2.
@Test
public void acceptTest_2() {
AcceptUrlFilter filter = new AcceptUrlFilter(encode("/abc/*"));
SpanBo spanBo = new SpanBo();
spanBo.setRpc("/test");
Assert.assertFalse(filter.accept(Arrays.asList(spanBo)));
}
use of com.navercorp.pinpoint.common.server.bo.SpanBo in project pinpoint by naver.
the class CallTreeTest method makeSpanAlign.
private SpanAlign makeSpanAlign(long startTime, int elapsed) {
SpanBo span = new SpanBo();
span.setStartTime(startTime);
span.setElapsed(elapsed);
return new SpanAlign(span);
}
use of com.navercorp.pinpoint.common.server.bo.SpanBo in project pinpoint by naver.
the class SpanIdMatcherTest method testApproximateMatchMinus.
@Test
public void testApproximateMatchMinus() throws Exception {
List<SpanBo> matchSpanList = new ArrayList<SpanBo>();
SpanBo spanBo1 = new SpanBo();
spanBo1.setStartTime(99);
matchSpanList.add(spanBo1);
SpanBo spanBo2 = new SpanBo();
spanBo2.setStartTime(110);
matchSpanList.add(spanBo2);
SpanIdMatcher spanIdMatcher = new SpanIdMatcher(matchSpanList);
SpanBo match = spanIdMatcher.approximateMatch(100);
Assert.assertTrue(match == spanBo2);
Assert.assertEquals(1, spanIdMatcher.other().size());
Assert.assertTrue(spanBo1 == spanIdMatcher.other().get(0));
}
Aggregations