public static <I extends Request, O extends Response>
    Function<Service<I, O>, MetricCollectingService<I, O>> newDecorator(
            MeterIdPrefixFunction meterIdPrefixFunction) {

        requireNonNull(meterIdPrefixFunction, "meterIdPrefixFunction");
        return delegate -> new MetricCollectingService<>(delegate, meterIdPrefixFunction);
    }
public static < I extends Request , O extends Response > Function < Service < I , O > , MetricCollectingService < I , O > > newDecorator ( MeterIdPrefixFunction meterIdPrefixFunction ) { requireNonNull ( meterIdPrefixFunction , "meterIdPrefixFunction" ) ; return delegate -> new MetricCollectingService < > ( delegate , meterIdPrefixFunction ) ; }
Returns a new {@link Service} decorator that tracks request stats using {@link MeterRegistry}.