use of com.navercorp.pinpoint.web.vo.SpanHint in project pinpoint by naver.
the class SpanQueryBuilderTest method spanFilter_false.
@Test
public void spanFilter_false() {
SpanHint spanHint = new SpanHint(COLLECTOR_ACCEPTOR_TIME, RESPONSE_TIME, "appName");
SpanQueryBuilder builder = new SpanQueryBuilder();
Predicate<SpanBo> filter = builder.newSpanFilter(txId, spanHint);
SpanBo span = new SpanBo();
Assert.assertFalse(filter.test(span));
}
use of com.navercorp.pinpoint.web.vo.SpanHint in project pinpoint by naver.
the class HeatMapServiceImpl method dotToGetTraceInfo.
private GetTraceInfo dotToGetTraceInfo(String applicationName, Dot dot) {
TransactionId transactionId = dot.getTransactionId();
SpanHint spanHint = new SpanHint(dot.getAcceptedTime(), dot.getElapsedTime(), applicationName);
return new GetTraceInfo(transactionId, spanHint);
}
use of com.navercorp.pinpoint.web.vo.SpanHint in project pinpoint by naver.
the class SpanQueryBuilder method build.
public SpanQuery build(GetTraceInfo getTraceInfo) {
SpanHint hint = getTraceInfo.getHint();
if (!hint.isSet()) {
return new SpanQuery(getTraceInfo.getTransactionId());
}
Predicate<SpanBo> spanPredicate = newSpanFilter(getTraceInfo.getTransactionId(), hint);
Filter hbaseFilter = getTimeStampFilter(getTraceInfo.getHint());
return new SpanQuery(getTraceInfo.getTransactionId(), spanPredicate, hbaseFilter);
}
use of com.navercorp.pinpoint.web.vo.SpanHint in project pinpoint by naver.
the class FilteringSpanDecoderTest method decodeTest3.
@Test
public void decodeTest3() {
final String applicationId = "test";
SpanBo spanBo = Random.createSpanBo(applicationId);
SpanDecoder mockSpanDecoder = createMockSpanDecoder(spanBo);
GetTraceInfo getTraceInfo = new GetTraceInfo(spanBo.getTransactionId(), new SpanHint(spanBo.getCollectorAcceptTime(), spanBo.getElapsed(), applicationId + "1"));
SpanQueryBuilder builder = new SpanQueryBuilder();
SpanQuery query = builder.build(getTraceInfo);
FilteringSpanDecoder filteringSpanDecoder = new FilteringSpanDecoder(mockSpanDecoder, query.getSpanFilter());
Object result = filteringSpanDecoder.decode(null, null, null);
Assert.assertNull(result);
}
use of com.navercorp.pinpoint.web.vo.SpanHint in project pinpoint by naver.
the class FilteringSpanDecoderTest method decodeTest4.
@Test
public void decodeTest4() {
final String applicationId = "test";
SpanBo spanBo = Random.createSpanBo(applicationId);
SpanDecoder mockSpanDecoder = createMockSpanDecoder(spanBo);
GetTraceInfo getTraceInfo = new GetTraceInfo(spanBo.getTransactionId(), new SpanHint(spanBo.getCollectorAcceptTime(), spanBo.getElapsed(), null));
SpanQueryBuilder builder = new SpanQueryBuilder();
SpanQuery query = builder.build(getTraceInfo);
FilteringSpanDecoder filteringSpanDecoder = new FilteringSpanDecoder(mockSpanDecoder, query.getSpanFilter());
Object result = filteringSpanDecoder.decode(null, null, null);
Assert.assertNotNull(result);
}
Aggregations