use of com.navercorp.pinpoint.web.view.TraceViewerDataViewModel in project pinpoint by naver.
the class BusinessTransactionController method traceViewerData.
@GetMapping(value = "/traceViewerData")
public TraceViewerDataViewModel traceViewerData(@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) {
logger.debug("GET /traceViewerData params {traceId={}, focusTimestamp={}, agentId={}, spanId={}}", traceIdParam, focusTimestamp, agentId, spanId);
final TransactionId transactionId = TransactionIdUtils.parseTransactionId(traceIdParam);
final ColumnGetCount columnGetCount = ColumnGetCountFactory.create(callstackSelectSpansLimit);
// select spans
Predicate<SpanBo> spanMatchFilter = SpanFilters.spanFilter(spanId, agentId, focusTimestamp);
SpanResult spanResult = this.spanService.selectSpan(transactionId, spanMatchFilter, columnGetCount);
final CallTreeIterator callTreeIterator = spanResult.getCallTree();
RecordSet recordSet = this.transactionInfoService.createRecordSet(callTreeIterator, spanMatchFilter);
return new TraceViewerDataViewModel(recordSet);
}
Aggregations