use of com.navercorp.pinpoint.common.trace.ServiceType in project pinpoint by naver.
the class ApplicationServerTypeResolver method resolve.
public ServiceType resolve() {
ServiceType resolvedApplicationServerType;
if (this.defaultType == ServiceType.UNDEFINED) {
resolvedApplicationServerType = this.resolver.resolve();
logger.info("Resolved ApplicationServerType : {}", resolvedApplicationServerType.getName());
} else {
resolvedApplicationServerType = this.defaultType;
logger.info("Configured ApplicationServerType : {}", resolvedApplicationServerType.getName());
}
return resolvedApplicationServerType;
}
use of com.navercorp.pinpoint.common.trace.ServiceType in project pinpoint by naver.
the class ServerBuilder method buildLogicalServer.
/**
* filled with application information of physical server and service instance
*
* @param hostHistogram
*/
public ServerInstanceList buildLogicalServer(final AgentHistogramList hostHistogram) {
ServerInstanceList serverInstanceList = new ServerInstanceList();
for (AgentHistogram agentHistogram : hostHistogram.getAgentHistogramList()) {
final String instanceName = agentHistogram.getId();
final String hostName = getHostName(agentHistogram.getId());
final ServiceType serviceType = agentHistogram.getServiceType();
final ServerInstance serverInstance = new ServerInstance(hostName, instanceName, serviceType.getCode());
serverInstanceList.addServerInstance(serverInstance);
}
return serverInstanceList;
}
use of com.navercorp.pinpoint.common.trace.ServiceType in project pinpoint by naver.
the class AgentTimeHistogram method createResponseTimeViewModel.
public List<ResponseTimeViewModel> createResponseTimeViewModel(List<TimeHistogram> timeHistogramList) {
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, timeHistogramList)));
// value.add(new ResponseTimeViewModel(schema.getFastErrorSlot().getSlotName(), getColumnValue(SlotType.FAST_ERROR, timeHistogramList)));
value.add(new ResponseTimeViewModel(schema.getNormalSlot().getSlotName(), getColumnValue(SlotType.NORMAL, timeHistogramList)));
// value.add(new ResponseTimeViewModel(schema.getNormalErrorSlot().getSlotName(), getColumnValue(SlotType.NORMAL_ERROR, timeHistogramList)));
value.add(new ResponseTimeViewModel(schema.getSlowSlot().getSlotName(), getColumnValue(SlotType.SLOW, timeHistogramList)));
// value.add(new ResponseTimeViewModel(schema.getSlowErrorSlot().getSlotName(), getColumnValue(SlotType.SLOW_ERROR, timeHistogramList)));
value.add(new ResponseTimeViewModel(schema.getVerySlowSlot().getSlotName(), getColumnValue(SlotType.VERY_SLOW, timeHistogramList)));
// value.add(new ResponseTimeViewModel(schema.getVerySlowErrorSlot().getSlotName(), getColumnValue(SlotType.VERY_SLOW_ERROR, timeHistogramList)));
value.add(new ResponseTimeViewModel(schema.getErrorSlot().getSlotName(), getColumnValue(SlotType.ERROR, timeHistogramList)));
return value;
}
use of com.navercorp.pinpoint.common.trace.ServiceType in project pinpoint by naver.
the class RpcURLPatternFilter method accept.
@Override
public boolean accept(List<SpanBo> fromSpanList) {
for (SpanBo spanBo : fromSpanList) {
List<SpanEventBo> spanEventBoList = spanBo.getSpanEventBoList();
if (spanEventBoList == null) {
return REJECT;
}
for (SpanEventBo event : spanEventBoList) {
final ServiceType eventServiceType = serviceTypeRegistryService.findServiceType(event.getServiceType());
if (!eventServiceType.isRpcClient()) {
continue;
}
if (!eventServiceType.isRecordStatistics()) {
continue;
}
// http://api.domain.com/test/ArticleList.do
// slice url ->/test/ArticleList.do
final List<AnnotationBo> annotationBoList = event.getAnnotationBoList();
if (annotationBoList == null) {
continue;
}
for (AnnotationBo annotationBo : annotationBoList) {
// TODO ?? url format & annotation type detect
int key = annotationBo.getKey();
if (isURL(key)) {
String url = (String) annotationBo.getValue();
String path = getPath(url);
final boolean match = matcher.match(urlPattern, path);
if (match) {
return ACCEPT;
}
}
}
}
}
return REJECT;
}
Aggregations