Search in sources :

Example 6 with RecordSet

use of com.navercorp.pinpoint.web.vo.callstacks.RecordSet 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);
}
Also used : ColumnGetCount(com.navercorp.pinpoint.common.hbase.bo.ColumnGetCount) CallTreeIterator(com.navercorp.pinpoint.web.calltree.span.CallTreeIterator) SpanResult(com.navercorp.pinpoint.web.service.SpanResult) TransactionTimelineInfoViewModel(com.navercorp.pinpoint.web.view.TransactionTimelineInfoViewModel) 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

RecordSet (com.navercorp.pinpoint.web.vo.callstacks.RecordSet)6 CallTreeIterator (com.navercorp.pinpoint.web.calltree.span.CallTreeIterator)4 SpanResult (com.navercorp.pinpoint.web.service.SpanResult)4 ColumnGetCount (com.navercorp.pinpoint.common.hbase.bo.ColumnGetCount)3 TransactionId (com.navercorp.pinpoint.common.profiler.util.TransactionId)3 SpanBo (com.navercorp.pinpoint.common.server.bo.SpanBo)3 GetMapping (org.springframework.web.bind.annotation.GetMapping)3 ApplicationMap (com.navercorp.pinpoint.web.applicationmap.ApplicationMap)2 TransactionInfoViewModel (com.navercorp.pinpoint.web.view.TransactionInfoViewModel)2 Record (com.navercorp.pinpoint.web.vo.callstacks.Record)2 TransactionId (com.navercorp.pinpoint.common.util.TransactionId)1 Align (com.navercorp.pinpoint.web.calltree.span.Align)1 SpanAlign (com.navercorp.pinpoint.web.calltree.span.SpanAlign)1 FilteredMapServiceOption (com.navercorp.pinpoint.web.service.FilteredMapServiceOption)1 TraceViewerDataViewModel (com.navercorp.pinpoint.web.view.TraceViewerDataViewModel)1 TransactionTimelineInfoViewModel (com.navercorp.pinpoint.web.view.TransactionTimelineInfoViewModel)1 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)1 ResponseBody (org.springframework.web.bind.annotation.ResponseBody)1 ServletUriComponentsBuilder (org.springframework.web.servlet.support.ServletUriComponentsBuilder)1