private static Optional<String> handlerBinding(Request request) {
        BindingMatch<?> match = request.getBindingMatch();
        if (match == null) return Optional.empty();
        UriPattern matched = match.matched();
        if (matched == null) return Optional.empty();
        return Optional.ofNullable(matched.toString());
    }
Common HTTP request handler metrics code.

@author jonmv
@author bjorncs
container-core/src/main/java/com/yahoo/container/core/HandlerMetricContextUtil.java