|
|
@ -46,7 +46,7 @@ public class ExceptionPolarisReporter implements EnhancedFeignPlugin {
|
|
|
|
private final ConsumerAPI consumerAPI;
|
|
|
|
private final ConsumerAPI consumerAPI;
|
|
|
|
|
|
|
|
|
|
|
|
public ExceptionPolarisReporter(RpcEnhancementReporterProperties reporterProperties,
|
|
|
|
public ExceptionPolarisReporter(RpcEnhancementReporterProperties reporterProperties,
|
|
|
|
ConsumerAPI consumerAPI) {
|
|
|
|
ConsumerAPI consumerAPI) {
|
|
|
|
this.reporterProperties = reporterProperties;
|
|
|
|
this.reporterProperties = reporterProperties;
|
|
|
|
this.consumerAPI = consumerAPI;
|
|
|
|
this.consumerAPI = consumerAPI;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -75,12 +75,10 @@ public class ExceptionPolarisReporter implements EnhancedFeignPlugin {
|
|
|
|
if (exception instanceof SocketTimeoutException) {
|
|
|
|
if (exception instanceof SocketTimeoutException) {
|
|
|
|
retStatus = RetStatus.RetTimeout;
|
|
|
|
retStatus = RetStatus.RetTimeout;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
LOG.debug("Will report result of {}. Request=[{} {}]. Response=[{}].", retStatus.name(), request.httpMethod().name(), request.url(), response.status());
|
|
|
|
LOG.debug("Will report result of {}. Request=[{} {}]. Response=[{}].", retStatus.name(), request.httpMethod()
|
|
|
|
|
|
|
|
.name(), request.url(), response.status());
|
|
|
|
ServiceCallResult resultRequest = ReporterUtils.createServiceCallResult(request, retStatus);
|
|
|
|
ServiceCallResult resultRequest = ReporterUtils.createServiceCallResult(request, retStatus);
|
|
|
|
consumerAPI.updateServiceCallResult(resultRequest);
|
|
|
|
consumerAPI.updateServiceCallResult(resultRequest);
|
|
|
|
// update result without method for service circuit break.
|
|
|
|
|
|
|
|
resultRequest.setMethod("");
|
|
|
|
|
|
|
|
consumerAPI.updateServiceCallResult(resultRequest);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|