Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/source-c/sentry-tiny
- Owner: source-c
- License: apache-2.0
- Created: 2018-01-25T22:01:04.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2021-09-03T21:04:25.000Z (over 3 years ago)
- Last Synced: 2024-12-20T01:17:04.142Z (about 1 month ago)
- Topics: clojure-library, dkdhub, sentry, tbt-cloud, tiny-tools
- Language: Clojure
- Homepage:
- Size: 41 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.adoc
- License: LICENSE
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]