A Clojure library for sending exceptions to yellerapp.com
Make a client with yeller.clojure.client/client
:
(require '[yeller.clojure.client :as yeller])
(def client (yeller/client {:token "YOUR API TOKEN HERE"}))
Report an exception:
(yeller/report client my-exception)
There are a bunch of configuration options for the client, and a method for
attaching additional context to the exception report. See the doc strings for
client
and report
for more on those.
This client ships with a ring middleware for automatically catching exceptions. If you're building a ring app, likely this is how your app should interface with yeller:
(yeller.clojure.ring/wrap-ring my-handler {:token "YOUR TOKEN HERE"
:environment "production"})
Yeller's client
returns an object that satisfies
java.lang.Thread.UnhandledExceptionHandler
. To set it as the default uncaught
thread exception handler:
(Thread/setDefaultUncaughtExceptionHandler yeller-client)
Note that it does not do this by default - touching global mutable state across the JVM in libraries is real bad.
This client builds on top of the java client
As such, it inherits that client's retry functionality - if there's an error communicating with yeller's servers, the client will retry multiple times.
Copyright © 2014 Tom Crayford
Distributed under the Eclipse Public License version 1.0