use of com.navercorp.pinpoint.web.view.TransactionTimelineInfoViewModel in project pinpoint by naver.
the class BusinessTransactionController method transactionTimelineInfo.
/**
* info lookup for a selected transaction
*
* @param traceId
* @param focusTimestamp
* @return
*/
@GetMapping(value = "/transactionTimelineInfo")
public TransactionTimelineInfoViewModel transactionTimelineInfo(@RequestParam("traceId") String traceId, @RequestParam(value = "focusTimestamp", required = false, defaultValue = DEFAULT_FOCUS_TIMESTAMP) long focusTimestamp, @RequestParam(value = "agentId", required = false) String agentId, @RequestParam(value = "spanId", required = false, defaultValue = DEFAULT_SPANID) long spanId) {
logger.debug("GET /transactionTimelineInfo params {traceId={}, focusTimestamp={}, agentId={}, spanId={}}", traceId, focusTimestamp, agentId, spanId);
final TransactionId transactionId = TransactionIdUtils.parseTransactionId(traceId);
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();
String traceViewerDataURL = ServletUriComponentsBuilder.fromPath("traceViewerData.pinpoint").queryParam("traceId", URLEncoder.encode(traceId, StandardCharsets.UTF_8)).queryParam("focusTimestamp", focusTimestamp).queryParam("agentId", URLEncoder.encode(agentId, StandardCharsets.UTF_8)).queryParam("spanId", spanId).build().toUriString();
RecordSet recordSet = this.transactionInfoService.createRecordSet(callTreeIterator, spanMatchFilter);
return new TransactionTimelineInfoViewModel(transactionId, spanId, recordSet, traceViewerDataURL, logConfiguration);
}
Aggregations