Add the following to your Leiningen’s project.clj
:
[net.tbt-post/sentry-tiny "0.1.14"]
and just use it to catch your exception:
(require '[sentry-tiny.core :as stc])
(def dsn "http://<digest>@<sentry>/<id>")
(defn catch [ns _ _ ^Throwable e]
(-> dsn
stc/parse-dsn
(stc/capture (stc/e->evi [(str ns)] e))))
or to just send a message
(defn message [msg]
(-> dsn
stc/parse-dsn
(stc/capture
(stc/e->evi [(str *ns*)]
(RuntimeException. msg))
"warning")))
You may eventually use it as a replacement inside of your web app router.
Copyright © 2017-2021
Distributed under the Apache License v 2.0