A thin wrapper around the official Java library for Sentry.
(require '[raven-clj.core :as raven])
(def dsn
"https://blah:[email protected]/bloo")
(try
(do-something-risky)
(catch Exception e
(raven/send-event dsn {:throwable e}))):breadcrumbs- a collection ofBreadcrumbmaps. See below.:checksum-for- aStringwhose checksum should be associated with the event.:checksum- aStringwhich is the checksum for the event, if you're doing your own checksumming.:culprit- aStringor aStackTraceElementwhich identifies the so-called culprit. This is not very well documented at Sentry, but here is an example of how they use theStringvariant in a Ruby application.:environment- aStringwhich identifies the environment.:event-id- aUUIDto identify the event. Autogenerated if not specified.:extra- a map withKeywordorStringkeys (or anything for whichclojure.core/namecan be invoked) and values which can be JSON-ified. If:throwableis given, this will automatically include itsex-data.:fingerprint- a sequence ofStrings that Sentry should use as a fingerprint.:interfaces- a map withKeywordorStringkeys and values that can be JSON-ified. See the Sentry documentation on interfaces for information on the expected format.:level- aKeyword. One of:debug,:info,:warning,:error,:fatal. Probably most useful in conjunction with:messageif you need to report an exceptional condition that's not an exception.:logger- aStringwhich identifies the logger.:message- aString. This is a different message than that of a Throwable.:platform- aStringwhich identifies the platform.:release- aStringwhich identifies the release.:server-name- aStringwhich identifies the server name.:tags- a map withKeywordorStringkeys (or anything for whichclojure.core/namecan be invoked) and values which can be coerced toStringswithclojure.core/str.:throwable- aThrowableobject. Sentry's bread and butter.:timestamp- something that can be coerced to aninstusing clj-time'sto-datecoercion
Read more about breadcrumbs at docs.sentry.io/learn/breadcrumbs/.
When an event has a :breadcrumbs key, each element of the value collection should be a map.
Supported keys of the map are:
:type- AString:timestamp- something that can be coerced to aninstusing clj-time'sto-datecoercion:level- aString:message- aString:category- aString:data- a map withStringkeys andStringvalues
Copyright © 2016 Coda Hale
Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.