Search in sources :

Example 1 with TraceViewerDataViewModel

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);
}
Also used : ColumnGetCount(com.navercorp.pinpoint.common.hbase.bo.ColumnGetCount) TraceViewerDataViewModel(com.navercorp.pinpoint.web.view.TraceViewerDataViewModel) CallTreeIterator(com.navercorp.pinpoint.web.calltree.span.CallTreeIterator) SpanResult(com.navercorp.pinpoint.web.service.SpanResult) RecordSet(com.navercorp.pinpoint.web.vo.callstacks.RecordSet) SpanBo(com.navercorp.pinpoint.common.server.bo.SpanBo) TransactionId(com.navercorp.pinpoint.common.profiler.util.TransactionId) GetMapping(org.springframework.web.bind.annotation.GetMapping)

Aggregations

ColumnGetCount (com.navercorp.pinpoint.common.hbase.bo.ColumnGetCount)1 TransactionId (com.navercorp.pinpoint.common.profiler.util.TransactionId)1 SpanBo (com.navercorp.pinpoint.common.server.bo.SpanBo)1 CallTreeIterator (com.navercorp.pinpoint.web.calltree.span.CallTreeIterator)1 SpanResult (com.navercorp.pinpoint.web.service.SpanResult)1 TraceViewerDataViewModel (com.navercorp.pinpoint.web.view.TraceViewerDataViewModel)1 RecordSet (com.navercorp.pinpoint.web.vo.callstacks.RecordSet)1 GetMapping (org.springframework.web.bind.annotation.GetMapping)1