...
|
...
|
@@ -271,10 +271,10 @@ public class ServiceServerExceptionMapperImpl extends InfluxDBQuery implements S |
|
|
|
|
|
String sql = "";
|
|
|
if(req.getServiceType() == -1){
|
|
|
sql = String.format("select stack from service_server_exception where %s and hostAddress = '%s' and time > '%s' and time < '%s'",contextFilter,req.getIp(),req.getStartTime(),req.getEndTime());
|
|
|
sql = String.format("select stack from service_server_exception where %s and hostAddress = '%s' and time > '%s' and time < '%s' order by time desc limit 50",contextFilter,req.getIp(),req.getStartTime(),req.getEndTime());
|
|
|
|
|
|
}else{
|
|
|
sql = String.format("select stack from service_server_exception where context='%s' and hostAddress = '%s' and time > '%s' and time < '%s'",req.getServiceName(),req.getIp(),req.getStartTime(),req.getEndTime());
|
|
|
sql = String.format("select stack from service_server_exception where context='%s' and hostAddress = '%s' and time > '%s' and time < '%s' order by time desc limit 50",req.getServiceName(),req.getIp(),req.getStartTime(),req.getEndTime());
|
|
|
}
|
|
|
|
|
|
String source = "";
|
...
|
...
|
@@ -298,9 +298,9 @@ public class ServiceServerExceptionMapperImpl extends InfluxDBQuery implements S |
|
|
}
|
|
|
|
|
|
if(StringUtils.isNotBlank(req.getIp())){
|
|
|
sql = String.format("select stack from service_server_exception where context='%s' and time > '%s' and time < '%s' and hostAddress = '%s' and event = '%s'",req.getServiceName(),req.getStartTime(),req.getEndTime(),req.getIp(),req.getApiName());
|
|
|
sql = String.format("select stack from service_server_exception where context='%s' and time > '%s' and time < '%s' and hostAddress = '%s' and event = '%s' order by time desc limit 50",req.getServiceName(),req.getStartTime(),req.getEndTime(),req.getIp(),req.getApiName());
|
|
|
}else{
|
|
|
sql = String.format("select stack from service_server_exception where context='%s' and time > '%s' and time < '%s' and event = '%s'",req.getServiceName(),req.getStartTime(),req.getEndTime(),req.getApiName());
|
|
|
sql = String.format("select stack from service_server_exception where context='%s' and time > '%s' and time < '%s' and event = '%s' order by time desc limit 50",req.getServiceName(),req.getStartTime(),req.getEndTime(),req.getApiName());
|
|
|
}
|
|
|
|
|
|
return queryErrorInfoList(source,sql);
|
...
|
...
|
|