A thin wrapper around the official Java library for Sentry.
A thin wrapper around the official Java library for Sentry.
(init! dsn)
(init! dsn config)
Initialize Sentry with the mandatory dsn
Other options include:
key | description | default |
---|---|---|
:environment | Set the environment on which Sentry events will be logged, e.g., "production" | production |
:debug | Enable SDK logging at the debug level | false |
:release | All events are assigned to a particular release | |
:shutdown-timeout | Wait up to X milliseconds before shutdown if there are events to send | 2000ms |
:in-app-excludes | A seqable collection (vector for example) containing package names to ignore when sending events | |
:enable-uncaught-exception-handler | Enables the uncaught exception handler | true |
For example:
(init! "http://abcdefg@localhost:19000/2")
(init! "http://abcdefg@localhost:19000/2" {:environment "production" :debug true :release "foo.bar@1.0.0" :in-app-excludes ["foo.bar"])
Initialize Sentry with the mandatory `dsn` Other options include: | key | description | default |--------------------------------------|--------------------------------------------------------------------------------------------------|-------- | `:environment` | Set the environment on which Sentry events will be logged, e.g., "production" | production | `:debug` | Enable SDK logging at the debug level | false | `:release` | All events are assigned to a particular release | | `:shutdown-timeout` | Wait up to X milliseconds before shutdown if there are events to send | 2000ms | `:in-app-excludes` | A seqable collection (vector for example) containing package names to ignore when sending events | | `:enable-uncaught-exception-handler` | Enables the uncaught exception handler | true For example: ```clojure (init! "http://abcdefg@localhost:19000/2") ``` ```clojure (init! "http://abcdefg@localhost:19000/2" {:environment "production" :debug true :release "foo.bar@1.0.0" :in-app-excludes ["foo.bar"]) ```
(send-event event)
Sends the given event to Sentry, returning the event's id
Supports sending throwables:
(sentry/send-event {:message "oh no",
:throwable (RuntimeException. "foo bar"})
Sends the given event to Sentry, returning the event's id Supports sending throwables: ``` (sentry/send-event {:message "oh no", :throwable (RuntimeException. "foo bar"}) ```
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close