Search in sources :

Example 1 with CallTreeIterator

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;
}
Also used : SpanAlign(com.navercorp.pinpoint.web.calltree.span.SpanAlign) CallTreeIterator(com.navercorp.pinpoint.web.calltree.span.CallTreeIterator) SpanBo(com.navercorp.pinpoint.common.server.bo.SpanBo)

Example 2 with CallTreeIterator

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;
}
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

CallTreeIterator (com.navercorp.pinpoint.web.calltree.span.CallTreeIterator)2 SpanBo (com.navercorp.pinpoint.common.server.bo.SpanBo)1 TransactionId (com.navercorp.pinpoint.common.util.TransactionId)1 ApplicationMap (com.navercorp.pinpoint.web.applicationmap.ApplicationMap)1 SpanAlign (com.navercorp.pinpoint.web.calltree.span.SpanAlign)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