Search in sources :

Example 76 with Application

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

the class LinkVisitCheckerTest method testVisitCaller.

@Test
public void testVisitCaller() throws Exception {
    LinkVisitChecker checker = new LinkVisitChecker();
    Application testApplication = new Application("test", ServiceType.STAND_ALONE);
    Assert.assertFalse(checker.visitCaller(testApplication));
    Assert.assertTrue(checker.visitCaller(testApplication));
    Application newApp = new Application("newApp", ServiceType.STAND_ALONE);
    Assert.assertFalse(checker.visitCaller(newApp));
    Assert.assertTrue(checker.visitCaller(newApp));
}
Also used : LinkVisitChecker(com.navercorp.pinpoint.web.service.LinkVisitChecker) Application(com.navercorp.pinpoint.web.vo.Application) Test(org.junit.Test)

Example 77 with Application

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

the class MapController method getServerMapData.

/**
     * Server map data query within from ~ to timeframe
     *
     * @param applicationName
     * @param serviceTypeName
     * @param from
     * @param to
     * @return
     */
@RequestMapping(value = "/getServerMapData", method = RequestMethod.GET, params = "serviceTypeName")
@ResponseBody
public MapWrap getServerMapData(@RequestParam("applicationName") String applicationName, @RequestParam("serviceTypeName") String serviceTypeName, @RequestParam("from") long from, @RequestParam("to") long to, @RequestParam(value = "callerRange", defaultValue = DEFAULT_SEARCH_DEPTH) int callerRange, @RequestParam(value = "calleeRange", defaultValue = DEFAULT_SEARCH_DEPTH) int calleeRange) {
    final Range range = new Range(from, to);
    this.dateLimit.limit(range);
    SearchOption searchOption = new SearchOption(callerRange, calleeRange);
    assertSearchOption(searchOption);
    Application application = applicationFactory.createApplicationByTypeName(applicationName, serviceTypeName);
    return selectApplicationMap(application, range, searchOption);
}
Also used : SearchOption(com.navercorp.pinpoint.web.vo.SearchOption) Range(com.navercorp.pinpoint.web.vo.Range) Application(com.navercorp.pinpoint.web.vo.Application) RequestMapping(org.springframework.web.bind.annotation.RequestMapping) ResponseBody(org.springframework.web.bind.annotation.ResponseBody)

Example 78 with Application

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

the class MapController method getLastServerMapData.

/**
     * Server map data query for the last "Period" timeframe
     *
     * @param applicationName
     * @param serviceTypeCode
     * @param period
     * @return
     */
@RequestMapping(value = "/getLastServerMapData", method = RequestMethod.GET, params = "serviceTypeCode")
@ResponseBody
public MapWrap getLastServerMapData(@RequestParam("applicationName") String applicationName, @RequestParam("serviceTypeCode") short serviceTypeCode, @RequestParam("period") long period, @RequestParam(value = "callerRange", defaultValue = DEFAULT_SEARCH_DEPTH) int callerRange, @RequestParam(value = "calleeRange", defaultValue = DEFAULT_SEARCH_DEPTH) int calleeRange) {
    long to = TimeUtils.getDelayLastTime();
    long from = to - period;
    final Range range = new Range(from, to);
    this.dateLimit.limit(range);
    SearchOption searchOption = new SearchOption(callerRange, calleeRange);
    assertSearchOption(searchOption);
    Application application = applicationFactory.createApplication(applicationName, serviceTypeCode);
    return selectApplicationMap(application, range, searchOption);
}
Also used : SearchOption(com.navercorp.pinpoint.web.vo.SearchOption) Range(com.navercorp.pinpoint.web.vo.Range) Application(com.navercorp.pinpoint.web.vo.Application) RequestMapping(org.springframework.web.bind.annotation.RequestMapping) ResponseBody(org.springframework.web.bind.annotation.ResponseBody)

Example 79 with Application

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

the class MapController method getLastServerMapData.

/**
     * Server map data query for the last "Period" timeframe
     *
     * @param applicationName
     * @param serviceTypeName
     * @param period
     * @return
     */
@RequestMapping(value = "/getLastServerMapData", method = RequestMethod.GET, params = "serviceTypeName")
@ResponseBody
public MapWrap getLastServerMapData(@RequestParam("applicationName") String applicationName, @RequestParam("serviceTypeName") String serviceTypeName, @RequestParam("period") long period, @RequestParam(value = "callerRange", defaultValue = DEFAULT_SEARCH_DEPTH) int callerRange, @RequestParam(value = "calleeRange", defaultValue = DEFAULT_SEARCH_DEPTH) int calleeRange) {
    long to = TimeUtils.getDelayLastTime();
    long from = to - period;
    final Range range = new Range(from, to);
    this.dateLimit.limit(range);
    SearchOption searchOption = new SearchOption(callerRange, calleeRange);
    assertSearchOption(searchOption);
    Application application = applicationFactory.createApplicationByTypeName(applicationName, serviceTypeName);
    return selectApplicationMap(application, range, searchOption);
}
Also used : SearchOption(com.navercorp.pinpoint.web.vo.SearchOption) Range(com.navercorp.pinpoint.web.vo.Range) Application(com.navercorp.pinpoint.web.vo.Application) RequestMapping(org.springframework.web.bind.annotation.RequestMapping) ResponseBody(org.springframework.web.bind.annotation.ResponseBody)

Example 80 with Application

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

the class ApplicationMapBuilder method createTargetLink.

private void createTargetLink(NodeList nodeList, LinkList linkList, LinkDataMap linkDataMap) {
    for (LinkData linkData : linkDataMap.getLinkDataList()) {
        final Application fromApplicationId = linkData.getFromApplication();
        Node fromNode = nodeList.findNode(fromApplicationId);
        final Application toApplicationId = linkData.getToApplication();
        Node toNode = nodeList.findNode(toApplicationId);
        // rpc client missing
        if (fromNode == null) {
            logger.warn("fromNode rcp client not found:{}", toApplicationId);
            continue;
        }
        // for RPC clients: skip if there is a dest application, convert to "unknown cloud" if not
        if (toNode.getServiceType().isRpcClient()) {
            // check if "to" node exists
            if (!nodeList.containsNode(toNode.getApplication())) {
                final Link link = addLink(linkList, fromNode, toNode, CreateType.Target);
                if (link != null) {
                    logger.debug("createRpcTargetLink:{}", link);
                }
            }
        } else {
            final Link link = addLink(linkList, fromNode, toNode, CreateType.Target);
            if (link != null) {
                logger.debug("createTargetLink:{}", link);
            }
        }
    }
}
Also used : LinkData(com.navercorp.pinpoint.web.applicationmap.rawdata.LinkData) 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