Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/source-c/sentry-tiny

Tiny & Lightweight Clojure interface for catching to Sentry
https://github.com/source-c/sentry-tiny

clojure-library dkdhub sentry tbt-cloud tiny-tools

Last synced: 26 days ago
JSON representation

Tiny & Lightweight Clojure interface for catching to Sentry

Awesome Lists containing this project

README

        

= 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]