private static String requestType(Request req, List<String> monitoringHandlerPaths,
                                          List<String> searchHandlerPaths) {
            HttpRequest.RequestType requestType = (HttpRequest.RequestType)req.getAttribute(requestTypeAttribute);
            if (requestType != null) return requestType.name().toLowerCase();
            // Deduce from path and method:
            String path = req.getHttpURI().getPath();
            if (path == null) return "none";
            for (String monitoringHandlerPath : monitoringHandlerPaths) {
                if (path.startsWith(monitoringHandlerPath)) return "monitoring";
            }
            for (String searchHandlerPath : searchHandlerPaths) {
                if (path.startsWith(searchHandlerPath)) return "read";
            }
            var method = req.getMethod();
            if (method == null) return "none";
            else if ("GET".equals(method)) return "read";
            else return "write";
        }
A {@link RequestLog} implementation that collects statistics like HTTP response types aggregated by category.
Implemented as a {@link RequestLog} instead of {@link org.eclipse.jetty.server.handler.EventsHandler} to ensure
that 400 responses from e.g. invalid request headers are also included.

@author ollivir
@author bjorncs
container-core/src/main/java/com/yahoo/jdisc/http/server/jetty/MetricAggregatingRequestLog.java