class MonitoringHandler {

    public void updateRequestPerRuleMonitoring(HttpServerRequest request, String metricName){
        if(isRequestPerRuleMonitoringActive()){
            String headerValue = StringUtils.getStringOrDefault(request.getHeader(requestPerRuleMonitoringProperty), UNKNOWN_VALUE);
            if(StringUtils.isNotEmptyTrimmed(metricName)){
                String key = headerValue + "." + metricName;
                getRequestPerRuleMonitoringMap().merge(key, 1L, (oldValue, one) -> oldValue + one);
            } else {
                Logger requestlog = RequestLoggerFactory.getLogger(MonitoringHandler.class, request);
                requestlog.warn("Request per rule monitoring is active but was called without a rule metricName. This request will be ignored.");
            }
        }
    }

    @Deprecated public  MonitoringHandler(Vertx vertx, RedisClient redisClient, final ResourceStorage storage, String prefix);
    @Deprecated public  MonitoringHandler(Vertx vertx, RedisClient redisClient, final ResourceStorage storage, String prefix, String requestPerRulePath);
    public  MonitoringHandler(Vertx vertx, final ResourceStorage storage, String prefix);
    public  MonitoringHandler(Vertx vertx, final ResourceStorage storage, String prefix, String requestPerRulePath);

}