Skip to content

Latest commit

 

History

History
54 lines (37 loc) · 1.34 KB

README.md

File metadata and controls

54 lines (37 loc) · 1.34 KB

CL-SENTRY-CLIENT

Sentry client for Common Lisp

WIP

Basic usage

(sentry-client:initialize-sentry-client <sentry-dsn>)
(sentry-client:with-sentry-error-handler () (error "test"))

Or in your own error handler:

(handler-case (my-code-with-error)
   (error (e)
      (sentry-client:capture-exception e)
      ...)))

Hunchentoot handler

(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

(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 alt text

License

MIT