ON_ERROR signal and 5xx http status are classified as errors #235
This commit is contained in:
@@ -151,10 +151,10 @@ public class FlowControlFilter extends FizzWebFilter {
|
||||
long start = System.currentTimeMillis();
|
||||
return chain.filter(exchange).doFinally(s -> {
|
||||
long rt = System.currentTimeMillis() - start;
|
||||
if (s == SignalType.ON_COMPLETE) {
|
||||
flowStat.addRequestRT(resourceConfigs, currentTimeSlot, rt, true);
|
||||
} else {
|
||||
if (s == SignalType.ON_ERROR || exchange.getResponse().getStatusCode().is5xxServerError()) {
|
||||
flowStat.addRequestRT(resourceConfigs, currentTimeSlot, rt, false);
|
||||
} else {
|
||||
flowStat.addRequestRT(resourceConfigs, currentTimeSlot, rt, true);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user