(client access-token)
(client access-token options)
Create a client that can can be passed used to send notifications to Rollbar. The following options can be set:
:os
The name of the operating system running on the host. Defaults to the value
of the os.name
system property.:hostname
The hostname of the host. You can usually ommit this key, the
default will be read from the HOSTNAME
or COMPUTERNAME
enviroment variables.:file-root
The path on disk where the filenames in stack traces are relative
to. Defaults the current working directory, as reported by the user.dir
system
property.:environment
The environment that the app is running is, for example staging
or dev
. Defaults to production
.:code-version
A string, up to 40 characters, describing the version of the
application code. Rollbar understands these formats:
-- semantic version (i.e. '2.1.12')
-- integer (i.e. '45')
-- git SHA (i.e. '3da541559918a808c2402bba5012f6c60b27661c')
There is no default value.:result-fn
(for advanced usage) a function that will be called after each
exception is sent to Rollbar. The function will be passed 2 parameters:
(fn [exception {:keys [err message]}]
(log/info exception "Rollbar result: %d: %s" err message))
:block-fields
A list of fields to remove/scrub from the payload prior to
sending to Rollbar using kebab case keywords. Input can contain keys in any
variation of kebab or snake cased keywords or strings. For example, given
:first-name
field the following keys will be automatically removed from input:
:first-name
, :first_name
"first-name"
"first_name"
Example: [:first-name :last-name :address]See https://rollbar.com/docs/api/items_post/
More information on System Properties: https://docs.oracle.com/javase/tutorial/essential/environment/sysprop.html
Create a client that can can be passed used to send notifications to Rollbar. The following options can be set: - `:os` The name of the operating system running on the host. Defaults to the value of the `os.name` system property. - `:hostname` The hostname of the host. You can usually ommit this key, the default will be read from the `HOSTNAME` or `COMPUTERNAME` enviroment variables. - `:file-root` The path on disk where the filenames in stack traces are relative to. Defaults the current working directory, as reported by the `user.dir` system property. - `:environment` The environment that the app is running is, for example `staging` or `dev`. Defaults to `production`. - `:code-version` A string, up to 40 characters, describing the version of the application code. Rollbar understands these formats: -- semantic version (i.e. '2.1.12') -- integer (i.e. '45') -- git SHA (i.e. '3da541559918a808c2402bba5012f6c60b27661c') There is no default value. `:result-fn` (for advanced usage) a function that will be called after each exception is sent to Rollbar. The function will be passed 2 parameters: - The Throwable that was being reported - A map with the result of sending the exception to Rollbar. This map will have the following keys: :err - an integer, 1 if there was an error sending the exception to Rollbar, 0 otherwise. :message - A human-readable message describing the error. ```clojure (fn [exception {:keys [err message]}] (log/info exception "Rollbar result: %d: %s" err message)) ``` - `:block-fields` A list of fields to remove/scrub from the payload prior to sending to Rollbar using kebab case keywords. Input can contain keys in any variation of kebab or snake cased keywords or strings. For example, given `:first-name` field the following keys will be automatically removed from input: `:first-name`, `:first_name` `"first-name"` `"first_name"` Example: [:first-name :last-name :address] See https://rollbar.com/docs/api/items_post/ More information on System Properties: https://docs.oracle.com/javase/tutorial/essential/environment/sysprop.html
(critical level client exception)
(critical level
{:keys [result-fn send-fn block-fields] :as client}
exception
{:keys [url params]})
Notify Rollbar of an exception with level critical
.
See the notify
function for more information
Notify Rollbar of an exception with level `critical`. See the [[notify]] function for more information
(debug level client exception)
(debug level
{:keys [result-fn send-fn block-fields] :as client}
exception
{:keys [url params]})
Notify Rollbar of an exception with level debug
.
See the notify
function for more information
Notify Rollbar of an exception with level `debug`. See the [[notify]] function for more information
(error level client exception)
(error level
{:keys [result-fn send-fn block-fields] :as client}
exception
{:keys [url params]})
Notify Rollbar of an exception with level error
.
See the notify
function for more information
Notify Rollbar of an exception with level `error`. See the [[notify]] function for more information
(info level client exception)
(info level
{:keys [result-fn send-fn block-fields] :as client}
exception
{:keys [url params]})
Notify Rollbar of an exception with level info
.
See the notify
function for more information
Notify Rollbar of an exception with level `info`. See the [[notify]] function for more information
(load-source-file file-name)
Returns a vector of the lines of the given file.
Returns a vector of the lines of the given file.
(notify level client exception)
(notify level
{:keys [result-fn send-fn block-fields] :as client}
exception
{:keys [url params]})
Report an exception to Rollbar.
Report an exception to Rollbar.
(setup-uncaught-exception-handler client)
(setup-uncaught-exception-handler client handler)
Setup handler to report all uncaught exceptions to rollbar, and optionally to an additional handler.
Setup handler to report all uncaught exceptions to rollbar, and optionally to an additional handler.
(warning level client exception)
(warning level
{:keys [result-fn send-fn block-fields] :as client}
exception
{:keys [url params]})
Notify Rollbar of an exception with level warning
.
See the notify
function for more information
Notify Rollbar of an exception with level `warning`. See the [[notify]] function for more information
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close