Search in sources :

Example 41 with Application

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

the class DFSLinkSelector method getLinkKey.

private LinkKey getLinkKey(LinkData emulationLinkData) {
    Application fromApplication = emulationLinkData.getFromApplication();
    Application toApplication = emulationLinkData.getToApplication();
    return new LinkKey(fromApplication, toApplication);
}
Also used : LinkKey(com.navercorp.pinpoint.web.vo.LinkKey) RpcApplication(com.navercorp.pinpoint.web.service.map.RpcApplication) Application(com.navercorp.pinpoint.web.vo.Application) AcceptApplication(com.navercorp.pinpoint.web.service.map.AcceptApplication)

Example 42 with Application

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

the class DFSLinkSelector method selectCaller.

/**
     * Queries for all applications(callee) called by the callerApplication
     *
     * @param callerApplication
     * @param range
     * @return
     */
private LinkDataDuplexMap selectCaller(Application callerApplication, Range range, SearchDepth searchDepth) {
    // skip if the callerApplication has already been checked
    if (linkVisitChecker.visitCaller(callerApplication)) {
        return new LinkDataDuplexMap();
    }
    LinkDataMap caller = mapStatisticsCallerDao.selectCaller(callerApplication, range);
    if (logger.isDebugEnabled()) {
        logger.debug("Found Caller. count={}, caller={}", caller.size(), callerApplication);
    }
    final LinkDataMap replaceRpcCaller = new LinkDataMap();
    for (LinkData callerLink : caller.getLinkDataList()) {
        final List<LinkData> checkedLink = checkRpcCallAccepted(callerLink, range);
        for (LinkData linkData : checkedLink) {
            replaceRpcCaller.addLinkData(linkData);
        }
    }
    final LinkDataDuplexMap resultCaller = new LinkDataDuplexMap();
    for (LinkData link : replaceRpcCaller.getLinkDataList()) {
        resultCaller.addSourceLinkData(link);
        final Application toApplication = link.getToApplication();
        // skip if toApplication is a terminal or an unknown cloud
        if (toApplication.getServiceType().isTerminal() || toApplication.getServiceType().isUnknown()) {
            continue;
        }
        // search depth check
        final SearchDepth nextLevel = searchDepth.nextDepth();
        if (nextLevel.isDepthOverflow()) {
            continue;
        }
        logger.debug("     Find subCaller of {}", toApplication);
        LinkDataDuplexMap callerSub = selectCaller(toApplication, range, nextLevel);
        logger.debug("     Found subCaller. count={}, caller={}", callerSub.size(), toApplication);
        resultCaller.addLinkDataDuplexMap(callerSub);
        // find all callers of queried subCallers as well
        for (LinkData eachCaller : callerSub.getSourceLinkDataList()) {
            logger.debug("     Find callee of {}", eachCaller.getFromApplication());
            LinkDataDuplexMap calleeSub = selectCallee(eachCaller.getFromApplication(), range, nextLevel);
            logger.debug("     Found subCallee. count={}, callee={}", calleeSub.size(), eachCaller.getFromApplication());
            resultCaller.addLinkDataDuplexMap(calleeSub);
        }
    }
    return resultCaller;
}
Also used : RpcApplication(com.navercorp.pinpoint.web.service.map.RpcApplication) Application(com.navercorp.pinpoint.web.vo.Application) AcceptApplication(com.navercorp.pinpoint.web.service.map.AcceptApplication)

Example 43 with Application

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

the class AgentInfoServiceImpl method getApplicationNameList.

private List<String> getApplicationNameList(List<Application> applications) {
    List<String> applicationNameList = new ArrayList<>(applications.size());
    for (Application application : applications) {
        if (!applicationNameList.contains(application.getName())) {
            applicationNameList.add(application.getName());
        }
    }
    Collections.sort(applicationNameList, Ordering.usingToString());
    return applicationNameList;
}
Also used : ArrayList(java.util.ArrayList) Application(com.navercorp.pinpoint.web.vo.Application)

Example 44 with Application

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

the class AgentInfoServiceImpl method getApplicationAgentList.

@Override
public ApplicationAgentList getApplicationAgentList(ApplicationAgentList.Key key, long timestamp) {
    ApplicationAgentList applicationAgentList = new ApplicationAgentList();
    List<Application> applications = applicationIndexDao.selectAllApplicationNames();
    for (Application application : applications) {
        applicationAgentList.merge(this.getApplicationAgentList(key, application.getName(), timestamp));
    }
    return applicationAgentList;
}
Also used : ApplicationAgentList(com.navercorp.pinpoint.web.vo.ApplicationAgentList) Application(com.navercorp.pinpoint.web.vo.Application)

Example 45 with Application

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

the class ApplicationGroupSerializer method serialize.

@Override
public void serialize(ApplicationGroup applicationGroup, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException {
    jgen.writeStartArray();
    List<Application> applicationList = applicationGroup.getApplicationList();
    for (Application application : applicationList) {
        jgen.writeObject(application);
    }
    jgen.writeEndArray();
}
Also used : Application(com.navercorp.pinpoint.web.vo.Application)

Aggregations

Application (com.navercorp.pinpoint.web.vo.Application)90 Test (org.junit.Test)39 Rule (com.navercorp.pinpoint.web.alarm.vo.Rule)30 MapStatisticsCallerDataCollector (com.navercorp.pinpoint.web.alarm.collector.MapStatisticsCallerDataCollector)15 ResponseTimeDataCollector (com.navercorp.pinpoint.web.alarm.collector.ResponseTimeDataCollector)11 AcceptApplication (com.navercorp.pinpoint.web.service.map.AcceptApplication)11 RpcApplication (com.navercorp.pinpoint.web.service.map.RpcApplication)10 Range (com.navercorp.pinpoint.web.vo.Range)10 AgentHistogram (com.navercorp.pinpoint.web.applicationmap.rawdata.AgentHistogram)5 List (java.util.List)5 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)5 ResponseBody (org.springframework.web.bind.annotation.ResponseBody)5 AgentStatDataCollector (com.navercorp.pinpoint.web.alarm.collector.AgentStatDataCollector)4 AgentHistogramList (com.navercorp.pinpoint.web.applicationmap.rawdata.AgentHistogramList)4 LinkDataMap (com.navercorp.pinpoint.web.applicationmap.rawdata.LinkDataMap)4 ArrayList (java.util.ArrayList)4 Buffer (com.navercorp.pinpoint.common.buffer.Buffer)3 ServiceType (com.navercorp.pinpoint.common.trace.ServiceType)3 ErrorCountToCalleeChecker (com.navercorp.pinpoint.web.alarm.checker.ErrorCountToCalleeChecker)3 ErrorRateToCalleeChecker (com.navercorp.pinpoint.web.alarm.checker.ErrorRateToCalleeChecker)3