This is the sentry-client Reference Manual, version 0.0.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 05:22:52 2024 GMT+0.
The main system appears first, followed by any subsystem dependency.
sentry-client
Sentry client
Mariano Montone <marianomontone@gmail.com>
MIT
# CL-SENTRY-CLIENT
Sentry client for Common Lisp
WIP
## Basic usage
“‘lisp
(sentry-client:initialize-sentry-client <sentry-dsn>)
(sentry-client:with-sentry-error-handler () (error "test"))
“‘
Or in your own error handler:
“‘lisp
(handler-case (my-code-with-error)
(error (e)
(sentry-client:capture-exception e)
...)))
“‘
### Hunchentoot handler
“‘lisp
(defmethod hunchentoot:maybe-invoke-debugger :after (condition)
(when hunchentoot:*catch-errors-p*
;; There’s an error in trivial-backtrace:map-backtrace in SBCL
;; if we don’t set sb-debug:*stack-top-hint* to NIL
(let ((sb-debug:*stack-top-hint* nil))
(sentry-client:capture-exception condition))))
“‘
Just add ‘sentry-client.hunchentoot‘ as ASDF dependency to include the Hunchentoot handler.
## Async client version
The async version of the client uses simple-tasks library for sending HTTP requests in the background
“‘lisp
(ql:quickload :sentry-client.async)
(sentry-client:initialize-sentry-client <dsn> :client-class ’sentry-client:async-sentry-client)
(sentry-client:test-sentry-client)
“‘
## Screenshots
![alt text](https://github.com/mmontone/cl-sentry-client/raw/master/doc/screenshot1.png "Screenshot 1") ![alt text](https://github.com/mmontone/cl-sentry-client/raw/master/doc/screenshot2.png "Screenshot 2")
## License
MIT
0.0.1
dexador
(system).
cl-json
(system).
cl-ppcre
(system).
uuid
(system).
local-time
(system).
trivial-backtrace
(system).
babel
(system).
salza2
(system).
swank
(system).
alexandria
(system).
package.lisp
(file).
stacktrace.lisp
(file).
sentry-client.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
sentry-client/sentry-client.asd
sentry-client/package.lisp
sentry-client/stacktrace.lisp
sentry-client/sentry-client.lisp
sentry-client/stacktrace.lisp
package.lisp
(file).
sentry-client
(system).
buffer
(structure).
buffer-content
(reader).
(setf buffer-content)
(writer).
buffer-p
(function).
buffer-position
(reader).
(setf buffer-position)
(writer).
collect-stacktrace
(function).
copy-buffer
(function).
copy-stack-frame
(function).
current-line-number
(function).
encode-sbcl-stacktrace
(function).
get-beginning-of-line-pos
(function).
get-end-of-line-pos
(function).
get-frame-function
(function).
get-frame-vars
(function).
get-next-line-position
(function).
get-post-lines
(function).
get-pre-lines
(function).
get-previous-line-position
(function).
get-source-contexts
(function).
get-source-location-filename
(function).
line-string
(function).
load-location-buffer
(function).
make-buffer
(function).
make-stack-frame
(function).
move-to-position
(function).
split-lines
(function).
stack-frame
(structure).
stack-frame-context-line
(reader).
(setf stack-frame-context-line)
(writer).
stack-frame-filename
(reader).
(setf stack-frame-filename)
(writer).
stack-frame-function
(reader).
(setf stack-frame-function)
(writer).
stack-frame-line-number
(reader).
(setf stack-frame-line-number)
(writer).
stack-frame-p
(function).
stack-frame-post-context
(reader).
(setf stack-frame-post-context)
(writer).
stack-frame-pre-context
(reader).
(setf stack-frame-pre-context)
(writer).
stack-frame-to-json-object
(function).
stack-frame-vars
(reader).
(setf stack-frame-vars)
(writer).
sentry-client/sentry-client.lisp
stacktrace.lisp
(file).
sentry-client
(system).
*request*
(special variable).
*sentry-client*
(special variable).
capture-exception
(function).
initialize-instance
(method).
initialize-sentry-client
(function).
make-sentry-request
(function).
make-sentry-request-headers
(function).
make-sentry-user
(function).
sentry-client
(class).
sentry-request
(structure).
sentry-tags
(generic function).
sentry-user
(structure).
test-sentry-client
(function).
with-sentry-error-handler
(macro).
+dsn-regex+
(special variable).
+sentry-timestamp-format+
(special variable).
call-with-sentry-client
(function).
client-capture-exception
(method).
condition-severity-level
(generic function).
connection-timeout
(reader method).
(setf connection-timeout)
(writer method).
copy-geo-location
(function).
copy-sentry-request
(function).
copy-sentry-request-headers
(function).
copy-sentry-user
(function).
dsn
(reader method).
(setf dsn)
(writer method).
encode-core-event-attributes
(function).
encode-exception
(function).
encode-exception-event
(function).
encode-sentry-auth-header
(function).
encode-stacktrace
(function).
format-sentry-timestamp
(function).
geo-location
(structure).
geo-location-city
(reader).
(setf geo-location-city)
(writer).
geo-location-country-code
(reader).
(setf geo-location-country-code)
(writer).
geo-location-p
(function).
geo-location-region
(reader).
(setf geo-location-region)
(writer).
gzip-compression-p
(reader method).
(setf gzip-compression-p)
(writer method).
make-geo-location
(function).
make-sentry-client
(function).
make-sentry-event-id
(function).
parse-dsn
(function).
post-sentry-request
(function).
project-release
(reader method).
(setf project-release)
(writer method).
read-dsn
(function).
running-environment
(reader method).
(setf running-environment)
(writer method).
sentry-api-url
(function).
sentry-request-headers
(reader).
(setf sentry-request-headers)
(writer).
sentry-request-headers
(structure).
sentry-request-headers-accept
(reader).
(setf sentry-request-headers-accept)
(writer).
sentry-request-headers-host
(reader).
(setf sentry-request-headers-host)
(writer).
sentry-request-headers-p
(function).
sentry-request-headers-user-agent
(reader).
(setf sentry-request-headers-user-agent)
(writer).
sentry-request-method
(reader).
(setf sentry-request-method)
(writer).
sentry-request-p
(function).
sentry-request-url
(reader).
(setf sentry-request-url)
(writer).
sentry-transport
(reader method).
(setf sentry-transport)
(writer method).
sentry-user-email
(reader).
(setf sentry-user-email)
(writer).
sentry-user-extras
(reader).
(setf sentry-user-extras)
(writer).
sentry-user-geo
(reader).
(setf sentry-user-geo)
(writer).
sentry-user-id
(reader).
(setf sentry-user-id)
(writer).
sentry-user-ip-address
(reader).
(setf sentry-user-ip-address)
(writer).
sentry-user-p
(function).
sentry-user-username
(reader).
(setf sentry-user-username)
(writer).
server-name
(reader method).
(setf server-name)
(writer method).
with-sentry-client
(macro).
Packages are listed by definition order.
sentry-client
# CL-SENTRY-CLIENT
Sentry client for Common Lisp
WIP
## Basic usage
“‘lisp
(sentry-client:initialize-sentry-client <sentry-dsn>)
(sentry-client:with-sentry-error-handler () (error "test"))
“‘
Or in your own error handler:
“‘lisp
(handler-case (my-code-with-error)
(error (e)
(sentry-client:capture-exception e)
...)))
“‘
### Hunchentoot handler
“‘lisp
(defmethod hunchentoot:maybe-invoke-debugger :after (condition)
(when hunchentoot:*catch-errors-p*
;; There’s an error in trivial-backtrace:map-backtrace in SBCL
;; if we don’t set sb-debug:*stack-top-hint* to NIL
(let ((sb-debug:*stack-top-hint* nil))
(sentry-client:capture-exception condition))))
“‘
Just add ‘sentry-client.hunchentoot‘ as ASDF dependency to include the Hunchentoot handler.
## Async client version
The async version of the client uses simple-tasks library for sending HTTP requests in the background
“‘lisp
(ql:quickload :sentry-client.async)
(sentry-client:initialize-sentry-client <dsn> :client-class ’sentry-client:async-sentry-client)
(sentry-client:test-sentry-client)
“‘
## Screenshots
![alt text](https://github.com/mmontone/cl-sentry-client/raw/master/doc/screenshot1.png "Screenshot 1") ![alt text](https://github.com/mmontone/cl-sentry-client/raw/master/doc/screenshot2.png "Screenshot 2")
## License
MIT
common-lisp
.
*request*
(special variable).
*sentry-client*
(special variable).
capture-exception
(function).
initialize-sentry-client
(function).
make-sentry-request
(function).
make-sentry-request-headers
(function).
make-sentry-user
(function).
sentry-client
(class).
sentry-request
(structure).
sentry-tags
(generic function).
sentry-user
(structure).
test-sentry-client
(function).
with-sentry-error-handler
(macro).
+dsn-regex+
(special variable).
+sentry-timestamp-format+
(special variable).
buffer
(structure).
buffer-content
(reader).
(setf buffer-content)
(writer).
buffer-p
(function).
buffer-position
(reader).
(setf buffer-position)
(writer).
call-with-sentry-client
(function).
client-capture-exception
(generic function).
collect-stacktrace
(function).
condition-severity-level
(generic function).
connection-timeout
(generic reader).
(setf connection-timeout)
(generic writer).
copy-buffer
(function).
copy-geo-location
(function).
copy-sentry-request
(function).
copy-sentry-request-headers
(function).
copy-sentry-user
(function).
copy-stack-frame
(function).
current-line-number
(function).
dsn
(generic reader).
(setf dsn)
(generic writer).
encode-core-event-attributes
(function).
encode-exception
(function).
encode-exception-event
(function).
encode-sbcl-stacktrace
(function).
encode-sentry-auth-header
(function).
encode-stacktrace
(function).
format-sentry-timestamp
(function).
geo-location
(structure).
geo-location-city
(reader).
(setf geo-location-city)
(writer).
geo-location-country-code
(reader).
(setf geo-location-country-code)
(writer).
geo-location-p
(function).
geo-location-region
(reader).
(setf geo-location-region)
(writer).
get-beginning-of-line-pos
(function).
get-end-of-line-pos
(function).
get-frame-function
(function).
get-frame-vars
(function).
get-next-line-position
(function).
get-post-lines
(function).
get-pre-lines
(function).
get-previous-line-position
(function).
get-source-contexts
(function).
get-source-location-filename
(function).
gzip-compression-p
(generic reader).
(setf gzip-compression-p)
(generic writer).
line-string
(function).
load-location-buffer
(function).
make-buffer
(function).
make-geo-location
(function).
make-sentry-client
(function).
make-sentry-event-id
(function).
make-stack-frame
(function).
move-to-position
(function).
parse-dsn
(function).
post-sentry-request
(function).
project-release
(generic reader).
(setf project-release)
(generic writer).
read-dsn
(function).
running-environment
(generic reader).
(setf running-environment)
(generic writer).
sentry-api-url
(function).
sentry-request-headers
(reader).
(setf sentry-request-headers)
(writer).
sentry-request-headers
(structure).
sentry-request-headers-accept
(reader).
(setf sentry-request-headers-accept)
(writer).
sentry-request-headers-host
(reader).
(setf sentry-request-headers-host)
(writer).
sentry-request-headers-p
(function).
sentry-request-headers-user-agent
(reader).
(setf sentry-request-headers-user-agent)
(writer).
sentry-request-method
(reader).
(setf sentry-request-method)
(writer).
sentry-request-p
(function).
sentry-request-url
(reader).
(setf sentry-request-url)
(writer).
sentry-transport
(generic reader).
(setf sentry-transport)
(generic writer).
sentry-user-email
(reader).
(setf sentry-user-email)
(writer).
sentry-user-extras
(reader).
(setf sentry-user-extras)
(writer).
sentry-user-geo
(reader).
(setf sentry-user-geo)
(writer).
sentry-user-id
(reader).
(setf sentry-user-id)
(writer).
sentry-user-ip-address
(reader).
(setf sentry-user-ip-address)
(writer).
sentry-user-p
(function).
sentry-user-username
(reader).
(setf sentry-user-username)
(writer).
server-name
(generic reader).
(setf server-name)
(generic writer).
split-lines
(function).
stack-frame
(structure).
stack-frame-context-line
(reader).
(setf stack-frame-context-line)
(writer).
stack-frame-filename
(reader).
(setf stack-frame-filename)
(writer).
stack-frame-function
(reader).
(setf stack-frame-function)
(writer).
stack-frame-line-number
(reader).
(setf stack-frame-line-number)
(writer).
stack-frame-p
(function).
stack-frame-post-context
(reader).
(setf stack-frame-post-context)
(writer).
stack-frame-pre-context
(reader).
(setf stack-frame-pre-context)
(writer).
stack-frame-to-json-object
(function).
stack-frame-vars
(reader).
(setf stack-frame-vars)
(writer).
with-sentry-client
(macro).
Definitions are sorted by export status, category, package, and then by lexicographic order.
The current sentry client.
Setup an error handler that sends conditions signaled in BODY to Sentry.
If RESIGNAL is T (default), then the condition is resignaled after being captured by the Sentry handler.
Send CONDITION to Sentry.
Possible args:
- :EXTRAS: an association list with extra app specific information to encode in the Sentry event.
Use for testing the sentry client.
Use: (test-sentry-client ’error "my error")
Returns an alist of tags for ERROR.
User can specialize this generic function for custom CONDITION classes.
condition
)) ¶sentry-client
) &rest initargs) ¶The Request interface contains information on a HTTP request related to the event.
See: https://develop.sentry.dev/sdk/event-payloads/request/
An interface describing the authenticated User for a request.
You should provide at least one of id, email, ip_address, username for Sentry to be able to tell you how many users are affected by one issue, for example. Sending a user that has none of these attributes and only custom attributes is valid, but not as useful.
See: https://develop.sentry.dev/sdk/event-payloads/user/
structure-object
.
(or null string)
(or null string)
(or null string)
(or null string)
(or null sentry-client::geo-location)
list
A sentry client
client-capture-exception
.
(setf connection-timeout)
.
connection-timeout
.
(setf dsn)
.
dsn
.
(setf gzip-compression-p)
.
gzip-compression-p
.
initialize-instance
.
(setf project-release)
.
project-release
.
(setf running-environment)
.
running-environment
.
(setf sentry-transport)
.
sentry-transport
.
(setf server-name)
.
server-name
.
:http
:transport
10
:connection-timeout
The release version of the application.
:release
Identifies the host from which the event was recorded.
:server-name
"production"
:environment
t
:gzip-compression
Run BODY in the scope of a sentry client created from CLASS and ARGS.
Call FUNCTION in the context of a SENTRY-CLIENT instantied from CLIENT-CLASS and ARGS.
Encode core Sentry event attributes.
See: https://develop.sentry.dev/sdk/event-payloads/
Encode CONDITION into JSON-STREAM.
See: https://develop.sentry.dev/sdk/event-payloads/
Encode CONDITION to a string in JSON format for Sentry.
See: https://develop.sentry.dev/sdk/event-payloads/exception/
Encode Sentry authentication header.
Encode stacktrace for CONDITION as JSON in JSON-STREAM.
See: https://develop.sentry.dev/sdk/event-payloads/stacktrace/
Format TIMESTAMP for Sentry.
If no TIMESTAMP is provided, then current time is used.
city
.
Create an ID for a new Sentry event.
Parse a DSN string to a list object.
See: https://docs.sentry.io/product/sentry-basics/dsn-explainer/
Just send DATA to sentry api via HTTP.
Return a DSN object. If DSN is an object already, it returns it. If it is a string, it parses it.
The events url.
See: https://develop.sentry.dev/sdk/store/
host
.
url
.
geo
.
id
.
vars
.
sentry-client
) condition &key extras user transaction) ¶Send CONDITION to Sentry.
EXTRAS: an association list with extra app specific information to encode in the Sentry event.
The condition severity level (warning, error, etc)
sentry-client
)) ¶automatically generated reader method
sentry-client
)) ¶automatically generated writer method
sentry-client
)) ¶automatically generated reader method
dsn
.
sentry-client
)) ¶automatically generated writer method
dsn
.
sentry-client
)) ¶automatically generated reader method
sentry-client
)) ¶automatically generated writer method
sentry-client
)) ¶sentry-client
)) ¶The release version of the application.
sentry-client
)) ¶automatically generated reader method
sentry-client
)) ¶automatically generated writer method
sentry-client
)) ¶automatically generated reader method
sentry-client
)) ¶automatically generated writer method
sentry-client
)) ¶sentry-client
)) ¶Identifies the host from which the event was recorded.
Approximate geographical location of the end user or device.
See: https://develop.sentry.dev/sdk/event-payloads/user/
structure-object
.
common-lisp
.
Jump to: | (
B C D E F G I L M P R S T W |
---|
Jump to: | (
B C D E F G I L M P R S T W |
---|
Jump to: | *
+
A C D E F G H I L M P R S T U V |
---|
Jump to: | *
+
A C D E F G H I L M P R S T U V |
---|
Jump to: | B C F G P S |
---|
Jump to: | B C F G P S |
---|