Search in sources :

Example 1 with AgentStatusTimeline

use of com.navercorp.pinpoint.web.vo.timeline.inspector.AgentStatusTimeline in project pinpoint by naver.

the class AgentInfoServiceImpl method getAgentStatusTimeline.

@Override
public InspectorTimeline getAgentStatusTimeline(String agentId, Range range, int... excludeAgentEventTypeCodes) {
    Assert.notNull(agentId, "agentId must not be null");
    Assert.notNull(range, "range must not be null");
    AgentStatus initialStatus = getAgentStatus(agentId, range.getFrom());
    List<AgentEvent> agentEvents = agentEventService.getAgentEvents(agentId, range);
    AgentStatusTimelineBuilder agentStatusTimelinebuilder = new AgentStatusTimelineBuilder(range, initialStatus);
    agentStatusTimelinebuilder.from(agentEvents);
    AgentStatusTimeline agentStatusTimeline = agentStatusTimelinebuilder.build();
    AgentEventTimelineBuilder agentEventTimelineBuilder = new AgentEventTimelineBuilder(range);
    agentEventTimelineBuilder.from(agentEvents);
    agentEventTimelineBuilder.addFilter(new AgentEventFilter.ExcludeFilter(excludeAgentEventTypeCodes));
    AgentEventTimeline agentEventTimeline = agentEventTimelineBuilder.build();
    return new InspectorTimeline(agentStatusTimeline, agentEventTimeline);
}
Also used : AgentEventFilter(com.navercorp.pinpoint.web.filter.agent.AgentEventFilter) AgentEventTimeline(com.navercorp.pinpoint.web.vo.timeline.inspector.AgentEventTimeline) AgentStatus(com.navercorp.pinpoint.web.vo.AgentStatus) AgentStatusTimeline(com.navercorp.pinpoint.web.vo.timeline.inspector.AgentStatusTimeline) AgentEventTimelineBuilder(com.navercorp.pinpoint.web.vo.timeline.inspector.AgentEventTimelineBuilder) InspectorTimeline(com.navercorp.pinpoint.web.vo.timeline.inspector.InspectorTimeline) AgentEvent(com.navercorp.pinpoint.web.vo.AgentEvent) AgentStatusTimelineBuilder(com.navercorp.pinpoint.web.vo.timeline.inspector.AgentStatusTimelineBuilder)

Aggregations

AgentEventFilter (com.navercorp.pinpoint.web.filter.agent.AgentEventFilter)1 AgentEvent (com.navercorp.pinpoint.web.vo.AgentEvent)1 AgentStatus (com.navercorp.pinpoint.web.vo.AgentStatus)1 AgentEventTimeline (com.navercorp.pinpoint.web.vo.timeline.inspector.AgentEventTimeline)1 AgentEventTimelineBuilder (com.navercorp.pinpoint.web.vo.timeline.inspector.AgentEventTimelineBuilder)1 AgentStatusTimeline (com.navercorp.pinpoint.web.vo.timeline.inspector.AgentStatusTimeline)1 AgentStatusTimelineBuilder (com.navercorp.pinpoint.web.vo.timeline.inspector.AgentStatusTimelineBuilder)1 InspectorTimeline (com.navercorp.pinpoint.web.vo.timeline.inspector.InspectorTimeline)1