Search in sources :

Example 1 with TransactionInfoViewModel

use of com.navercorp.pinpoint.web.view.TransactionInfoViewModel 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;
}
Also used : ApplicationMap(com.navercorp.pinpoint.web.applicationmap.ApplicationMap) CallTreeIterator(com.navercorp.pinpoint.web.calltree.span.CallTreeIterator) SpanResult(com.navercorp.pinpoint.web.service.SpanResult) TransactionInfoViewModel(com.navercorp.pinpoint.web.view.TransactionInfoViewModel) RecordSet(com.navercorp.pinpoint.web.vo.callstacks.RecordSet) TransactionId(com.navercorp.pinpoint.common.util.TransactionId) RequestMapping(org.springframework.web.bind.annotation.RequestMapping) ResponseBody(org.springframework.web.bind.annotation.ResponseBody)

Aggregations

TransactionId (com.navercorp.pinpoint.common.util.TransactionId)1 ApplicationMap (com.navercorp.pinpoint.web.applicationmap.ApplicationMap)1 CallTreeIterator (com.navercorp.pinpoint.web.calltree.span.CallTreeIterator)1 SpanResult (com.navercorp.pinpoint.web.service.SpanResult)1 TransactionInfoViewModel (com.navercorp.pinpoint.web.view.TransactionInfoViewModel)1 RecordSet (com.navercorp.pinpoint.web.vo.callstacks.RecordSet)1 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)1 ResponseBody (org.springframework.web.bind.annotation.ResponseBody)1