cl-sentry-client

2022-11-07

Sentry client

Upstream URL

github.com/mmontone/cl-sentry-client

Author

Mariano Montone <marianomontone@gmail.com>

License

MIT
README

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

Dependencies (8)

  • cl-json
  • cl-ppcre
  • drakma
  • hunchentoot
  • local-time
  • simple-tasks
  • trivial-backtrace
  • uuid

Dependents (0)

    • GitHub
    • Quicklisp