use of com.navercorp.pinpoint.web.vo.timeline.inspector.AgentEventTimelineBuilder 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);
}
Aggregations