use of com.navercorp.pinpoint.web.vo.GetTraceInfo in project pinpoint by naver.
the class FilteringSpanDecoderTest method constructorFailureTest3.
@Test(expected = NullPointerException.class)
public void constructorFailureTest3() {
SpanDecoder mockSpanDecoder = Mockito.mock(SpanDecoder.class);
TransactionId transactionId = Random.createTransactionId();
GetTraceInfo getTraceInfo = new GetTraceInfo(transactionId);
SpanQueryBuilder builder = new SpanQueryBuilder();
SpanQuery query = builder.build(getTraceInfo);
new FilteringSpanDecoder(mockSpanDecoder, query.getSpanFilter());
}
use of com.navercorp.pinpoint.web.vo.GetTraceInfo in project pinpoint by naver.
the class FilteringSpanDecoderTest method decodeTest2.
@Test
public void decodeTest2() {
SpanBo spanBo = Random.createSpanBo();
SpanDecoder mockSpanDecoder = createMockSpanDecoder(spanBo);
GetTraceInfo getTraceInfo = createGetTraceInfo(spanBo);
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);
}
use of com.navercorp.pinpoint.web.vo.GetTraceInfo 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.GetTraceInfo in project pinpoint by naver.
the class TransactionInfoServiceImpl method selectBusinessTransactions.
// Temporarily disabled Because We need to solve authentication problem inter system.
// @Value("${log.enable:false}")
// private boolean logLinkEnable;
// @Value("${log.button.name:}")
// private String logButtonName;
// @Value("${log.page.url:}")
// private String logPageUrl;
@Override
public BusinessTransactions selectBusinessTransactions(List<TransactionId> transactionIdList, String applicationName, Range range, Filter<List<SpanBo>> filter) {
Objects.requireNonNull(transactionIdList, "transactionIdList");
Objects.requireNonNull(applicationName, "applicationName");
Objects.requireNonNull(filter, "filter");
// TODO range is not used - check the logic again
Objects.requireNonNull(range, "range");
List<List<SpanBo>> traceList;
if (filter == Filter.<List<SpanBo>>acceptAllFilter()) {
List<GetTraceInfo> queryList = transactionIdList.stream().map(GetTraceInfo::new).collect(Collectors.toList());
traceList = this.traceDao.selectSpans(queryList);
} else {
traceList = this.traceDao.selectAllSpans(transactionIdList);
}
BusinessTransactions businessTransactions = new BusinessTransactions();
for (List<SpanBo> trace : traceList) {
if (!filter.include(trace)) {
continue;
}
for (SpanBo spanBo : trace) {
// show application's incoming requests
if (applicationName.equals(spanBo.getApplicationId())) {
businessTransactions.add(spanBo);
}
}
}
return businessTransactions;
}
use of com.navercorp.pinpoint.web.vo.GetTraceInfo 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);
}
Aggregations