use of com.navercorp.pinpoint.common.trace.ServiceType in project pinpoint by naver.
the class PluginTestAgent method ignoreServiceType.
@Override
public void ignoreServiceType(String... serviceTypes) {
for (String serviceType : serviceTypes) {
ServiceType t = findServiceType(serviceType);
ignoredServiceTypes.add(t.getCode());
}
}
use of com.navercorp.pinpoint.common.trace.ServiceType in project pinpoint by naver.
the class PluginTestAgent method resolveExpectedTrace.
private ResolvedExpectedTrace resolveExpectedTrace(ExpectedTrace expected, Integer asyncId) throws AssertionError {
final ServiceType serviceType = findServiceType(expected.getServiceType());
final Class<?> spanClass = resolveSpanClass(expected.getType());
final int apiId = getApiId(expected);
return new ResolvedExpectedTrace(spanClass, serviceType, apiId, expected.getRpc(), expected.getEndPoint(), expected.getRemoteAddr(), expected.getDestinationId(), expected.getAnnotations(), asyncId);
}
use of com.navercorp.pinpoint.common.trace.ServiceType in project pinpoint by naver.
the class PluginTestAgent method verifyServerType.
@Override
public void verifyServerType(String serviceTypeName) {
final ApplicationContext applicationContext = getApplicationContext();
ServiceType expectedType = findServiceType(serviceTypeName);
ServiceType actualType = applicationContext.getAgentInformation().getServerType();
if (!expectedType.equals(actualType)) {
throw new AssertionError("ResolvedExpectedTrace server type: " + expectedType.getName() + "[" + expectedType.getCode() + "] but was " + actualType + "[" + actualType.getCode() + "]");
}
}
use of com.navercorp.pinpoint.common.trace.ServiceType in project pinpoint by naver.
the class ApplicationMapBuilder method appendNodeResponseTime.
public void appendNodeResponseTime(NodeList nodeList, LinkList linkList, NodeHistogramDataSource nodeHistogramDataSource) {
if (nodeHistogramDataSource == null) {
throw new NullPointerException("nodeHistogramDataSource must not be null");
}
final Collection<Node> nodes = nodeList.getNodeList();
for (Node node : nodes) {
final ServiceType nodeType = node.getServiceType();
if (nodeType.isWas()) {
// for WAS nodes, set their own response time histogram
final Application wasNode = node.getApplication();
final NodeHistogram nodeHistogram = nodeHistogramDataSource.createNodeHistogram(wasNode);
node.setNodeHistogram(nodeHistogram);
} else if (nodeType.isTerminal() || nodeType.isUnknown()) {
final NodeHistogram nodeHistogram = createTerminalNodeHistogram(node, linkList);
node.setNodeHistogram(nodeHistogram);
} else if (nodeType.isQueue()) {
// Virtual queue node - queues with agent installed will be handled above as a WAS node
final NodeHistogram nodeHistogram = createTerminalNodeHistogram(node, linkList);
node.setNodeHistogram(nodeHistogram);
} else if (nodeType.isUser()) {
// for User nodes, find its source link and create the histogram
Application userNode = node.getApplication();
final NodeHistogram nodeHistogram = new NodeHistogram(userNode, range);
final List<Link> fromLink = linkList.findFromLink(userNode);
if (fromLink.size() > 1) {
// used first(0) link.
logger.warn("Invalid from UserNode:{}", linkList.getLinkList());
} else if (fromLink.isEmpty()) {
logger.warn("from UserNode not found:{}", userNode);
continue;
}
final Link sourceLink = fromLink.get(0);
nodeHistogram.setApplicationHistogram(sourceLink.getHistogram());
ApplicationTimeHistogram histogramData = sourceLink.getTargetApplicationTimeSeriesHistogramData();
nodeHistogram.setApplicationTimeHistogram(histogramData);
node.setNodeHistogram(nodeHistogram);
} else {
// dummy data
NodeHistogram dummy = new NodeHistogram(node.getApplication(), range);
node.setNodeHistogram(dummy);
}
}
}
use of com.navercorp.pinpoint.common.trace.ServiceType in project pinpoint by naver.
the class ApplicationTimeHistogram method createViewModel.
public List<ResponseTimeViewModel> createViewModel() {
final List<ResponseTimeViewModel> value = new ArrayList<>(5);
ServiceType serviceType = application.getServiceType();
HistogramSchema schema = serviceType.getHistogramSchema();
value.add(new ResponseTimeViewModel(schema.getFastSlot().getSlotName(), getColumnValue(SlotType.FAST)));
// value.add(new ResponseTimeViewModel(schema.getFastErrorSlot().getSlotName(), getColumnValue(SlotType.FAST_ERROR)));
value.add(new ResponseTimeViewModel(schema.getNormalSlot().getSlotName(), getColumnValue(SlotType.NORMAL)));
// value.add(new ResponseTimeViewModel(schema.getNormalErrorSlot().getSlotName(), getColumnValue(SlotType.NORMAL_ERROR)));
value.add(new ResponseTimeViewModel(schema.getSlowSlot().getSlotName(), getColumnValue(SlotType.SLOW)));
// value.add(new ResponseTimeViewModel(schema.getSlowErrorSlot().getSlotName(), getColumnValue(SlotType.SLOW_ERROR)));
value.add(new ResponseTimeViewModel(schema.getVerySlowSlot().getSlotName(), getColumnValue(SlotType.VERY_SLOW)));
// value.add(new ResponseTimeViewModel(schema.getVerySlowErrorSlot().getSlotName(), getColumnValue(SlotType.VERY_SLOW_ERROR)));
value.add(new ResponseTimeViewModel(schema.getErrorSlot().getSlotName(), getColumnValue(SlotType.ERROR)));
return value;
}
Aggregations