public OutlierDetectingRuleBuilder onResponseHeaders(
            BiFunction<? super RequestContext, ? super ResponseHeaders, OutlierDetectionDecision> function) {
        requireNonNull(function, "function");
        final OutlierRule rule = (ctx, headers, cause) -> {
            if (headers == null) {
                return OutlierDetectionDecision.NEXT;
            }
            return function.apply(ctx, headers);
        };
        addRule(rule);
        return this;
    }
Adds the specified function to determine whether the request is an outlier.
core/src/main/java/com/linecorp/armeria/common/outlier/OutlierDetectingRuleBuilder.java