Search in sources :

Example 1 with ServerInstanceListDataSource

use of com.navercorp.pinpoint.web.applicationmap.appender.server.datasource.ServerInstanceListDataSource in project pinpoint by naver.

the class FilteredMapServiceImpl method createMap.

private ApplicationMap createMap(FilteredMapServiceOption option, FilteredMap filteredMap) {
    final ApplicationMapBuilder applicationMapBuilder = applicationMapBuilderFactory.createApplicationMapBuilder(option.getOriginalRange());
    applicationMapBuilder.linkType(LinkType.DETAILED);
    final WasNodeHistogramDataSource wasNodeHistogramDataSource = new ResponseHistogramsNodeHistogramDataSource(filteredMap.getResponseHistograms());
    applicationMapBuilder.includeNodeHistogram(new DefaultNodeHistogramFactory(wasNodeHistogramDataSource));
    ServerInstanceListDataSource serverInstanceListDataSource = new AgentInfoServerInstanceListDataSource(agentInfoService);
    if (option.isUseStatisticsAgentState()) {
        applicationMapBuilder.includeServerInfo(new StatisticsServerInstanceListFactory(serverInstanceListDataSource));
    } else {
        applicationMapBuilder.includeServerInfo(new DefaultServerInstanceListFactory(serverInstanceListDataSource));
    }
    ApplicationMap map = applicationMapBuilder.build(filteredMap.getLinkDataDuplexMap(), buildTimeoutMillis);
    if (serverMapDataFilter != null) {
        map = serverMapDataFilter.dataFiltering(map);
    }
    return map;
}
Also used : AgentInfoServerInstanceListDataSource(com.navercorp.pinpoint.web.applicationmap.appender.server.datasource.AgentInfoServerInstanceListDataSource) DefaultNodeHistogramFactory(com.navercorp.pinpoint.web.applicationmap.appender.histogram.DefaultNodeHistogramFactory) ApplicationMap(com.navercorp.pinpoint.web.applicationmap.ApplicationMap) StatisticsServerInstanceListFactory(com.navercorp.pinpoint.web.applicationmap.appender.server.StatisticsServerInstanceListFactory) ServerInstanceListDataSource(com.navercorp.pinpoint.web.applicationmap.appender.server.datasource.ServerInstanceListDataSource) AgentInfoServerInstanceListDataSource(com.navercorp.pinpoint.web.applicationmap.appender.server.datasource.AgentInfoServerInstanceListDataSource) DefaultServerInstanceListFactory(com.navercorp.pinpoint.web.applicationmap.appender.server.DefaultServerInstanceListFactory) WasNodeHistogramDataSource(com.navercorp.pinpoint.web.applicationmap.appender.histogram.datasource.WasNodeHistogramDataSource) ResponseHistogramsNodeHistogramDataSource(com.navercorp.pinpoint.web.applicationmap.appender.histogram.datasource.ResponseHistogramsNodeHistogramDataSource) ApplicationMapBuilder(com.navercorp.pinpoint.web.applicationmap.ApplicationMapBuilder)

Example 2 with ServerInstanceListDataSource

use of com.navercorp.pinpoint.web.applicationmap.appender.server.datasource.ServerInstanceListDataSource in project pinpoint by naver.

the class MapServiceImpl method createApplicationMapBuilder.

private ApplicationMapBuilder createApplicationMapBuilder(MapServiceOption option) {
    ApplicationMapBuilder builder = applicationMapBuilderFactory.createApplicationMapBuilder(option.getRange());
    builder.nodeType(option.getNodeType());
    builder.linkType(option.getLinkType());
    WasNodeHistogramDataSource wasNodeHistogramDataSource = new MapResponseNodeHistogramDataSource(mapResponseDao);
    NodeHistogramFactory nodeHistogramFactory = new DefaultNodeHistogramFactory(wasNodeHistogramDataSource);
    builder.includeNodeHistogram(nodeHistogramFactory);
    ServerInstanceListDataSource serverInstanceListDataSource = new AgentInfoServerInstanceListDataSource(agentInfoService);
    if (option.isUseStatisticsAgentState()) {
        builder.includeServerInfo(new StatisticsServerInstanceListFactory(serverInstanceListDataSource));
    } else {
        builder.includeServerInfo(new DefaultServerInstanceListFactory(serverInstanceListDataSource));
    }
    return builder;
}
Also used : AgentInfoServerInstanceListDataSource(com.navercorp.pinpoint.web.applicationmap.appender.server.datasource.AgentInfoServerInstanceListDataSource) DefaultNodeHistogramFactory(com.navercorp.pinpoint.web.applicationmap.appender.histogram.DefaultNodeHistogramFactory) StatisticsServerInstanceListFactory(com.navercorp.pinpoint.web.applicationmap.appender.server.StatisticsServerInstanceListFactory) ServerInstanceListDataSource(com.navercorp.pinpoint.web.applicationmap.appender.server.datasource.ServerInstanceListDataSource) AgentInfoServerInstanceListDataSource(com.navercorp.pinpoint.web.applicationmap.appender.server.datasource.AgentInfoServerInstanceListDataSource) DefaultServerInstanceListFactory(com.navercorp.pinpoint.web.applicationmap.appender.server.DefaultServerInstanceListFactory) WasNodeHistogramDataSource(com.navercorp.pinpoint.web.applicationmap.appender.histogram.datasource.WasNodeHistogramDataSource) MapResponseNodeHistogramDataSource(com.navercorp.pinpoint.web.applicationmap.appender.histogram.datasource.MapResponseNodeHistogramDataSource) ApplicationMapBuilder(com.navercorp.pinpoint.web.applicationmap.ApplicationMapBuilder) DefaultNodeHistogramFactory(com.navercorp.pinpoint.web.applicationmap.appender.histogram.DefaultNodeHistogramFactory) NodeHistogramFactory(com.navercorp.pinpoint.web.applicationmap.appender.histogram.NodeHistogramFactory)

Aggregations

ApplicationMapBuilder (com.navercorp.pinpoint.web.applicationmap.ApplicationMapBuilder)2 DefaultNodeHistogramFactory (com.navercorp.pinpoint.web.applicationmap.appender.histogram.DefaultNodeHistogramFactory)2 WasNodeHistogramDataSource (com.navercorp.pinpoint.web.applicationmap.appender.histogram.datasource.WasNodeHistogramDataSource)2 DefaultServerInstanceListFactory (com.navercorp.pinpoint.web.applicationmap.appender.server.DefaultServerInstanceListFactory)2 StatisticsServerInstanceListFactory (com.navercorp.pinpoint.web.applicationmap.appender.server.StatisticsServerInstanceListFactory)2 AgentInfoServerInstanceListDataSource (com.navercorp.pinpoint.web.applicationmap.appender.server.datasource.AgentInfoServerInstanceListDataSource)2 ServerInstanceListDataSource (com.navercorp.pinpoint.web.applicationmap.appender.server.datasource.ServerInstanceListDataSource)2 ApplicationMap (com.navercorp.pinpoint.web.applicationmap.ApplicationMap)1 NodeHistogramFactory (com.navercorp.pinpoint.web.applicationmap.appender.histogram.NodeHistogramFactory)1 MapResponseNodeHistogramDataSource (com.navercorp.pinpoint.web.applicationmap.appender.histogram.datasource.MapResponseNodeHistogramDataSource)1 ResponseHistogramsNodeHistogramDataSource (com.navercorp.pinpoint.web.applicationmap.appender.histogram.datasource.ResponseHistogramsNodeHistogramDataSource)1