Search in sources :

Example 1 with BusinessTransactions

use of com.navercorp.pinpoint.web.vo.BusinessTransactions in project pinpoint by naver.

the class TransactionInfoServiceImpl method selectBusinessTransactions.

// Temporarily disabled Because We need to solve authentication problem inter system.
// @Value("#{pinpointWebProps['log.enable'] ?: false}")
// private boolean logLinkEnable;
// @Value("#{pinpointWebProps['log.button.name'] ?: ''}")
// private String logButtonName;
// @Value("#{pinpointWebProps['log.page.url'] ?: ''}")
// private String logPageUrl;
@Override
public BusinessTransactions selectBusinessTransactions(List<TransactionId> transactionIdList, String applicationName, Range range, Filter filter) {
    if (transactionIdList == null) {
        throw new NullPointerException("transactionIdList must not be null");
    }
    if (applicationName == null) {
        throw new NullPointerException("applicationName must not be null");
    }
    if (filter == null) {
        throw new NullPointerException("filter must not be null");
    }
    if (range == null) {
        // TODO range is not used - check the logic again
        throw new NullPointerException("range must not be null");
    }
    List<List<SpanBo>> traceList;
    if (filter == Filter.NONE) {
        traceList = this.traceDao.selectSpans(transactionIdList);
    } else {
        traceList = this.traceDao.selectAllSpans(transactionIdList);
    }
    BusinessTransactions businessTransactions = new BusinessTransactions();
    for (List<SpanBo> trace : traceList) {
        if (!filter.include(trace)) {
            continue;
        }
        for (SpanBo spanBo : trace) {
            // show application's incoming requests
            if (applicationName.equals(spanBo.getApplicationId())) {
                businessTransactions.add(spanBo);
            }
        }
    }
    return businessTransactions;
}
Also used : BusinessTransactions(com.navercorp.pinpoint.web.vo.BusinessTransactions) ArrayList(java.util.ArrayList) List(java.util.List) SpanBo(com.navercorp.pinpoint.common.server.bo.SpanBo)

Aggregations

SpanBo (com.navercorp.pinpoint.common.server.bo.SpanBo)1 BusinessTransactions (com.navercorp.pinpoint.web.vo.BusinessTransactions)1 ArrayList (java.util.ArrayList)1 List (java.util.List)1