use of com.navercorp.pinpoint.web.calltree.span.CallTreeIterator in project pinpoint by naver.
the class SpanServiceImpl method selectSpan.
@Override
public SpanResult selectSpan(TransactionId transactionId, long selectedSpanHint) {
if (transactionId == null) {
throw new NullPointerException("transactionId must not be null");
}
final List<SpanBo> spans = traceDao.selectSpan(transactionId);
if (CollectionUtils.isEmpty(spans)) {
return new SpanResult(SpanAligner2.FAIL_MATCH, new CallTreeIterator(null));
}
final SpanResult result = order(spans, selectedSpanHint);
final CallTreeIterator callTreeIterator = result.getCallTree();
final List<SpanAlign> values = callTreeIterator.values();
transitionDynamicApiId(values);
transitionSqlId(values);
transitionCachedString(values);
transitionException(values);
// TODO need to at least show the row data when root span is not found.
return result;
}
use of com.navercorp.pinpoint.web.calltree.span.CallTreeIterator in project pinpoint by naver.
the class BusinessTransactionController method transactionInfo.
/**
* info lookup for a selected transaction
*
* @param traceIdParam
* @param focusTimestamp
* @return
*/
@RequestMapping(value = "/transactionInfo", method = RequestMethod.GET)
@ResponseBody
public TransactionInfoViewModel transactionInfo(@RequestParam("traceId") String traceIdParam, @RequestParam(value = "focusTimestamp", required = false, defaultValue = "0") long focusTimestamp, @RequestParam(value = "agentId", required = false) String agentId, @RequestParam(value = "spanId", required = false, defaultValue = "-1") long spanId, @RequestParam(value = "v", required = false, defaultValue = "0") int viewVersion) {
logger.debug("GET /transactionInfo params {traceId={}, focusTimestamp={}, agentId={}, spanId={}, v={}}", traceIdParam, focusTimestamp, agentId, spanId, viewVersion);
final TransactionId transactionId = TransactionIdUtils.parseTransactionId(traceIdParam);
// select spans
final SpanResult spanResult = this.spanService.selectSpan(transactionId, focusTimestamp);
final CallTreeIterator callTreeIterator = spanResult.getCallTree();
// application map
ApplicationMap map = filteredMapService.selectApplicationMap(transactionId);
RecordSet recordSet = this.transactionInfoService.createRecordSet(callTreeIterator, focusTimestamp, agentId, spanId);
TransactionInfoViewModel result = new TransactionInfoViewModel(transactionId, map.getNodes(), map.getLinks(), recordSet, spanResult.getCompleteTypeString(), logLinkEnable, logButtonName, logPageUrl, disableButtonMessage);
return result;
}
Aggregations