 (defn- make-request-histogram [app-name registry]
   (-> (Histogram/build)
       (.namespace app-name)
-      (.name "http_request_durations_milliseconds")
+      (.name "http_request_latency_seconds")
       (.labelNames (into-array String ["method" "status" "path"]))
-      (.help "A histogram of the response latency for HTTP requests (in milliseconds).")
+      (.help "A histogram of the response latency for HTTP requests in seconds.")
       (.register registry)))
 
 (defn- record-request-metric [counter histogram request-method response-status request-time response-path]

            start-time (System/currentTimeMillis)
            response (handler request)
            finish-time (System/currentTimeMillis)
            request-time (- finish-time start-time)
            response-status (get response :status 404)
            response-path (get (meta response) :path "unspecified")]
        (record-request-metric counter histogram request-method response-status request-time response-path)
        response))))


    (-> (.labels counter labels)
        (.inc))
    (-> (.labels histogram labels)
        (.observe request-time))))

(defn instrument-handler [handler ^String app-name ^CollectorRegistry registry]
  "Ring middleware to record request metrics"
