|
@@ -29,6 +29,7 @@ public class ApiStatusEndpoint {
|
|
public Map<String, Object> endpoint() {
|
|
public Map<String, Object> endpoint() {
|
|
|
|
|
|
ReportorHolder.getApiDataReportor().report();
|
|
ReportorHolder.getApiDataReportor().report();
|
|
|
|
+ ReportorHolder.getConsoleReporter().report();
|
|
List<ReportInfo> reportInfoList = ReportorHolder.getApiDataReportor().getReportInfoList();
|
|
List<ReportInfo> reportInfoList = ReportorHolder.getApiDataReportor().getReportInfoList();
|
|
|
|
|
|
ReportInfo reportInfo = reportInfoList.get(0);
|
|
ReportInfo reportInfo = reportInfoList.get(0);
|
|
@@ -42,7 +43,7 @@ public class ApiStatusEndpoint {
|
|
if (!key.startsWith(MetricNames.API_EXCEPTION_METER.name())) {
|
|
if (!key.startsWith(MetricNames.API_EXCEPTION_METER.name())) {
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
- String mapping = key.substring(MetricNames.API_TIMER.name().length());
|
|
|
|
|
|
+ String mapping = key.substring(MetricNames.API_EXCEPTION_METER.name().length() + 1);
|
|
meterInfoMap.put(mapping, meterInfo);
|
|
meterInfoMap.put(mapping, meterInfo);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -54,7 +55,7 @@ public class ApiStatusEndpoint {
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
|
|
|
|
- String mapping = key.substring(MetricNames.API_TIMER.name().length());
|
|
|
|
|
|
+ String mapping = key.substring(MetricNames.API_TIMER.name().length() + 1);
|
|
|
|
|
|
ApiStatusInfo apiStatusInfo = new ApiStatusInfo();
|
|
ApiStatusInfo apiStatusInfo = new ApiStatusInfo();
|
|
result.add(apiStatusInfo);
|
|
result.add(apiStatusInfo);
|
|
@@ -88,7 +89,7 @@ public class ApiStatusEndpoint {
|
|
|
|
|
|
MeterInfo meterInfo = meterInfoMap.get(mapping);
|
|
MeterInfo meterInfo = meterInfoMap.get(mapping);
|
|
if (null == meterInfo) {
|
|
if (null == meterInfo) {
|
|
- apiStatusInfo.setExceptionCount(0);
|
|
|
|
|
|
+ apiStatusInfo.setExceptionCount(0L);
|
|
apiStatusInfo.setExceptionMeanRate(0);
|
|
apiStatusInfo.setExceptionMeanRate(0);
|
|
apiStatusInfo.setExceptionOneMinuteRate(0);
|
|
apiStatusInfo.setExceptionOneMinuteRate(0);
|
|
apiStatusInfo.setExceptionFiveMinuteRate(0);
|
|
apiStatusInfo.setExceptionFiveMinuteRate(0);
|