A netty-based Sentry client.
A netty-based Sentry client.
(add-breadcrumb! breadcrumb)
(add-breadcrumb! context breadcrumb)
Append a breadcrumb to the list of breadcrumbs.
The context is expected to be a map, and if no context is specified, a thread-local storage map will be used instead.
Append a breadcrumb to the list of breadcrumbs. The context is expected to be a map, and if no context is specified, a thread-local storage map will be used instead.
(add-contexts-to-payload payload)
Add relevant bits of sentry.interfaces.Contexts to our payload.
Add relevant bits of sentry.interfaces.Contexts to our payload.
(add-exception! e)
(add-exception! context e)
Add an exception to the context (or a thread-local storage).
Add an exception to the context (or a thread-local storage).
(add-extra! extra)
(add-extra! context extra)
Add a map of extra data to the context (or a thread-local storage) preserving its previous keys.
Add a map of extra data to the context (or a thread-local storage) preserving its previous keys.
(add-fingerprint! fingerprint)
(add-fingerprint! context fingerprint)
Add a custom fingerprint to the context (or a thread-local storage).
Add a custom fingerprint to the context (or a thread-local storage).
(add-fingerprint-to-payload context payload)
If the context provides a fingerprint override entry, pass it to the payload.
If the context provides a fingerprint override entry, pass it to the payload.
(add-full-ring-request! request)
(add-full-ring-request! context request)
Add HTTP information to the Sentry payload from a ring-compliant request map, including the request body
Add HTTP information to the Sentry payload from a ring-compliant request map, including the request body
(add-http-info! http-info)
(add-http-info! context http-info)
Add HTTP information to the sentry context (or a thread-local storage).
Add HTTP information to the sentry context (or a thread-local storage).
(add-ring-request! request)
(add-ring-request! context request)
Add HTTP information to the Sentry payload from a ring-compliant request map, excluding its body.
Add HTTP information to the Sentry payload from a ring-compliant request map, excluding its body.
(add-tag! tag value)
(add-tag! context tag value)
Add a custom tag to the context (or a thread-local storage).
Add a custom tag to the context (or a thread-local storage).
(add-tags! tags)
(add-tags! context tags)
Add custom tags to the context (or a thread-local storage).
Add custom tags to the context (or a thread-local storage).
(add-tags-to-payload context payload tags)
If the context provides tags or we were given tags directly during capture!, ad them to the payload. Tags provided by capture! override tags provided by the context map.
If the context provides tags or we were given tags directly during capture!, ad them to the payload. Tags provided by capture! override tags provided by the context map.
(add-user! user)
(add-user! context user)
Add user information to the sentry context (or a thread-local storage).
Add user information to the sentry context (or a thread-local storage).
(auth-header ts key sig)
Compute the Sentry auth header.
Compute the Sentry auth header.
(capture! dsn ev)
(capture! dsn ev tags)
(capture! context dsn event tags)
Send a capture over the network. If ev
is an exception,
build an appropriate payload for the exception.
Send a capture over the network. If `ev` is an exception, build an appropriate payload for the exception.
(clear-context)
Reset this thread's context
Reset this thread's context
(clear-http-stub)
A convenience function to clear the http stub.
This stub is only used when passing a DSN of ':memory:' to the lib.
A convenience function to clear the http stub. This stub is only used when passing a DSN of ':memory:' to the lib.
(close-http-connection response)
When having a connection pool set, the body cannot be closed as it's of a different type.
When having a connection pool set, the body cannot be closed as it's of a different type.
(default-payload ts localhost)
Provide default values for a payload.
Provide default values for a payload.
(get-full-ring-url request)
Given a ring compliant request object, return the full URL. This was lifted from ring's source code so as to not depend on it.
Given a ring compliant request object, return the full URL. This was lifted from ring's source code so as to not depend on it.
(get-hostname)
Get the current hostname by shelling out to 'hostname'
Get the current hostname by shelling out to 'hostname'
(get-linux-pretty-name)
Get the Linux distribution pretty name from /etc/os-release resp. /usr/lib/os-release.
Get the Linux distribution pretty name from /etc/os-release resp. /usr/lib/os-release.
(get-os-name-linux)
Get a human-readable name for the current linux distribution from /etc/os-release, caching the output
Get a human-readable name for the current linux distribution from /etc/os-release, caching the output
(hostname [age val])
Fetches the hostname by shelling to 'hostname', whenever the given age is stale enough. If the given age is recent, as defined by hostname-refresh-interval, returns age and val instead.
Fetches the hostname by shelling to 'hostname', whenever the given age is stale enough. If the given age is recent, as defined by hostname-refresh-interval, returns age and val instead.
How often to allow reading /etc/hostname, in seconds.
How often to allow reading /etc/hostname, in seconds.
Storage for stubbed http 'requests' - actually, we store just the request's payload in clojure form (before it's serialized to JSON).
Storage for stubbed http 'requests' - actually, we store just the request's payload in clojure form (before it's serialized to JSON).
(localhost)
Returns the local host name.
Returns the local host name.
(make-breadcrumb! message category)
(make-breadcrumb! message category level)
(make-breadcrumb! message category level timestamp)
Create a breadcrumb map.
level can be one of: ['debug' 'info' 'warning' 'warn' 'error' 'exception' 'critical' 'fatal']
Create a breadcrumb map. level can be one of: ['debug' 'info' 'warning' 'warn' 'error' 'exception' 'critical' 'fatal']
(make-http-info url method)
(make-http-info url method headers query_string cookies data env)
(make-ring-request-info request)
Create well-formatted context map for the Sentry 'HTTP' interface by extracting the information from a standard ring-compliant 'request', as defined in https://github.com/ring-clojure/ring/wiki/Concepts#requests
Create well-formatted context map for the Sentry 'HTTP' interface by extracting the information from a standard ring-compliant 'request', as defined in https://github.com/ring-clojure/ring/wiki/Concepts#requests
(make-user id)
(make-user id email ip-address username)
Create a user map.
Create a user map.
(merged-payload event ts localhost)
Return a payload map depending on the type of the event.
Return a payload map depending on the type of the event.
(parse-dsn dsn)
Extract DSN parameters into a map
Extract DSN parameters into a map
(payload context event ts localhost tags)
Build a full valid payload.
Build a full valid payload.
(perform-in-memory-request payload)
Perform an in-memory pseudo-request, actually just storing the payload on a storage atom, to let users inspect/retrieve the payload in their tests.
Perform an in-memory pseudo-request, actually just storing the payload on a storage atom, to let users inspect/retrieve the payload in their tests.
(re-throw-response response)
Throw the response in case of its status was not 2xx as we don't want Sentry errors to be unnoticed.
Throw the response in case of its status was not 2xx as we don't want Sentry errors to be unnoticed.
(release! webhook-endpoint payload)
Release new application version with provided webhook release URL.
Release new application version with provided webhook release URL.
Wraps map into SafeMap record, effectively hidding values from json output, will not allow 2-way roundtrip. ex: (safe-map {:a 1}) -> "#exoscale/safe-map [:a]". Can be used to hide secrets and/or shorten large/deep maps
Wraps map into SafeMap record, effectively hidding values from json output, will not allow 2-way roundtrip. ex: (safe-map {:a 1}) -> "#exoscale/safe-map [:a]". Can be used to hide secrets and/or shorten large/deep maps
(sentry-uuid!)
A random UUID, without dashes
A random UUID, without dashes
(sign payload ts key secret)
HMAC-SHA1 for Sentry's format.
HMAC-SHA1 for Sentry's format.
Storage for this particular thread.
This is a little funny in that it needs to be dereferenced once in order to obtain an atom that is sure to be per-thread.
Storage for this particular thread. This is a little funny in that it needs to be dereferenced once in order to obtain an atom that is sure to be per-thread.
(timestamp!)
Retrieve a timestamp.
The format used is the same as python's 'time.time()' function - the number of seconds since the epoch, as a double to acount for fractional seconds (since the granularity is miliseconds).
Retrieve a timestamp. The format used is the same as python's 'time.time()' function - the number of seconds since the epoch, as a double to acount for fractional seconds (since the granularity is miliseconds).
(validate-payload merged)
Returns a validated payload.
Returns a validated payload.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close