             [metrics.counters :as counters]
             [metrics.timers :as timers]
             [ring.util.response :refer [header response]]
+            [metrics.core :refer [default-registry]]
             [metrics.utils :refer [all-metrics]]
             [cheshire.core :refer [generate-string]]))
 

    {:type :counter
     :value (counters/value c)}))


; Utils -----------------------------------------------------------------------
(defn- ensure-leading-slash [s]
  (if (not= \/ (first s))
    (str \/ s)

     (let [request-uri (:uri request)]
       (if (or (.startsWith request-uri (sanitize-uri uri))
               (= request-uri uri))
         (serve-metrics request)
         (handler request))))))
