               breaking Hadoop. Shoot me a PR?
   :prefix     Service prefix for distinguishing this telemetry from other apps
               (default \"\")
+  :host       Override the hostname (default: nil; calls (localhost))
   :dt         How often to send telemetry events to Riemann, in seconds
               (default 5)
   :load       Target fraction of one core's CPU time to use for profiling

                 :metric      self-time
                 :ttl         (* 2 dt)
                 :tags        tags}))
         (concat [{:service (str prefix "profiler rate")
                   :state   "ok"
                   :metric  rate
                   :ttl     (* 2 dt)

            [riemann.client.http :as client])
  (:import (java.lang StackTraceElement)))

(def http-client client/client)
(def localhost client/localhost)

(def tags ["jvm" "profile"])

(defn report
  "Send information about stack statistics to Riemann."
  [client dt host prefix stats]
  (let [{:keys [rate sample]} stats]
    (->> sample
         stack/hotspots
         (map (fn [[^StackTraceElement frame
                    {:keys [self-time top-trace top-trace-time]}]]
                {:host        (or host (client/localhost))
                 :service     (str prefix "profiler fn "
                                   (.getClassName frame) " "
                                   (.getMethodName frame))
                 :file        (.getFileName frame)
