(capture)
(capture unknown-data-type)
(capture message :guard string?)
(capture kw :guard keyword?)
(capture throwable-event
:guard
(fn* [p1__25479#] (instance? Throwable p1__25479#)))
(capture data :guard map?)
(init config)
Initialise Sentry with the provided config
and return a function that can be
used in your application for logging of interesting events to Sentry, for example:
(def sentry-logger (init-sentry {:dsn "https://abcdefg@sentry.io:9000/2" :environment "local"}))
(sentry-logger {:message "Oh No!" :throwable (RuntimeException. "Something bad has happened!")})
It is highly recommended that a system such as Juxt
Clip, or
Integrant, or
Component or another
lifecycle/dependency manager is used to create and maintain the
sentry-logger
to ensure that it is only initialised only once. That
function reference can then be then used in whichever namespaces that are
appropriate for your application.
sentry-clj does not maintain a single stateful instance of Sentry, thus it
is entirely possible that it can be re-initialised multiple times. This
behaviour is not ideal nor supported.
Initialise Sentry with the provided `config` and return a function that can be used in your application for logging of interesting events to Sentry, for example: ```clojure (def sentry-logger (init-sentry {:dsn "https://abcdefg@sentry.io:9000/2" :environment "local"})) (sentry-logger {:message "Oh No!" :throwable (RuntimeException. "Something bad has happened!")}) ``` It is **highly** recommended that a system such as [Juxt Clip](https://github.com/juxt/clip), or [Integrant](https://github.com/weavejester/integrant), or [Component](https://github.com/stuartsierra/component) or another lifecycle/dependency manager is used to create and maintain the `sentry-logger` to ensure that it is only initialised only once. That function reference can then be then used in whichever namespaces that are appropriate for your application. sentry-clj does not maintain a single stateful instance of Sentry, thus it is entirely possible that it can be re-initialised multiple times. **This behaviour is not ideal nor supported**.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close