sentry-tiny

Tiny & Lightweight Clojure interface for catching to Sentry

APACHE-2.0 License

Downloads
1.6K
Stars
2
Committers
3

= sentry-tiny

A Clojure library designed to cover basic needs of pushing exceptions into Sentry. We should prize every moment, isn't it?

image:https://img.shields.io/github/license/source-c/sentry-tiny[GitHub] image:https://img.shields.io/clojars/v/net.tbt-post/sentry-tiny.svg[] image:https://img.shields.io/clojars/dt/net.tbt-post/sentry-tiny[ClojarsDownloads] image:https://img.shields.io/github/v/release/source-c/sentry-tiny[GitHub release (latest by date)] image:https://img.shields.io/github/release-date/source-c/sentry-tiny[GitHub Release Date] image:https://img.shields.io/github/v/tag/source-c/sentry-tiny[GitHub tag (latest by date)] image:https://img.shields.io/github/last-commit/source-c/sentry-tiny[GitHub last commit]

== Usage

Add the following to your http://github.com/technomancy/leiningen[Leiningen's] project.clj:

[source,clojure]

[net.tbt-post/sentry-tiny "0.1.14"]

and just use it to catch your exception:

[source,clojure]

(require '[sentry-tiny.core :as stc])

(def dsn "http://@/")

(defn catch [ns _ _ ^Throwable e]
(-> dsn
stc/parse-dsn
(stc/capture (stc/e->evi [(str ns)] e))))

or to just send a message

[source,clojure]

(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.

== Manual Build

[source,text]

$ lein install

== License

Copyright © 2017-2021

Distributed under the http://www.apache.org/licenses/LICENSE-2.0[Apache License v 2.0]

Package Rankings
Top 26.46% on Clojars.org