use of com.navercorp.pinpoint.common.hbase.bo.ColumnGetCount 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);
}
use of com.navercorp.pinpoint.common.hbase.bo.ColumnGetCount in project pinpoint by naver.
the class BusinessTransactionController method transactionInfo.
/**
* info lookup for a selected transaction
*
* @param traceId
* @param focusTimestamp
* @return
*/
@GetMapping(value = "/transactionInfo")
public TransactionInfoViewModel transactionInfo(@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, @RequestParam(value = "v", required = false, defaultValue = "0") int viewVersion, @RequestParam(value = "useStatisticsAgentState", required = false, defaultValue = "false") boolean useStatisticsAgentState, @RequestParam(value = "useLoadHistogramFormat", required = false, defaultValue = "false") boolean useLoadHistogramFormat) {
logger.debug("GET /transactionInfo params {traceId={}, focusTimestamp={}, agentId={}, spanId={}, v={}}", traceId, focusTimestamp, agentId, spanId, viewVersion);
final TransactionId transactionId = TransactionIdUtils.parseTransactionId(traceId);
final ColumnGetCount columnGetCount = ColumnGetCountFactory.create(callstackSelectSpansLimit);
Predicate<SpanBo> spanMatchFilter = SpanFilters.spanFilter(spanId, agentId, focusTimestamp);
// select spans
final SpanResult spanResult = this.spanService.selectSpan(transactionId, spanMatchFilter, columnGetCount);
final CallTreeIterator callTreeIterator = spanResult.getCallTree();
// application map
FilteredMapServiceOption.Builder optionBuilder = new FilteredMapServiceOption.Builder(transactionId, viewVersion, columnGetCount);
final FilteredMapServiceOption option = optionBuilder.setUseStatisticsAgentState(useStatisticsAgentState).build();
ApplicationMap map = filteredMapService.selectApplicationMap(option);
RecordSet recordSet = this.transactionInfoService.createRecordSet(callTreeIterator, spanMatchFilter);
TransactionInfoViewModel result = new TransactionInfoViewModel(transactionId, spanId, map.getNodes(), map.getLinks(), recordSet, spanResult.getTraceState(), logConfiguration);
if (useLoadHistogramFormat) {
result.setTimeHistogramFormat(TimeHistogramFormat.V2);
}
return result;
}
use of com.navercorp.pinpoint.common.hbase.bo.ColumnGetCount 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