8.16.0.4
Sentry Middleware for Koyo
(require koyo/sentry) | package: koyo-sentry |
This package provides middleware that automatically trace transactions and send exceptions to Sentry.
1 Reference
procedure
(make-sentry-component proc) → component?
proc : (-> (or/c #f sentry?))
Returns a wrapper component that calls proc when
started and sentry-stop on the wrapped client (unless the
result of proc is #f) when stopped.
Added in version 0.4 of package koyo-sentry.
Wraps hdl to trace requests to Sentry and to capture any
unhandled exceptions.
Added in version 0.4 of package koyo-sentry.
procedure
((wrap-sentry/cron client) proc) → (-> exact-integer? any)
client : (or/c #f sentry?) proc : (-> exact-integer? any)
Wraps proc to trace crontab executions to Sentry and to
capture any unhandled exceptions.
Added in version 0.4 of package koyo-sentry.
procedure
((wrap-sentry/job client) meta proc) → procedure?
client : (or/c #f sentry?) meta : job-metadata? proc : procedure?
Wraps proc to trace job executions to Sentry and to capture
any unhandled exceptions.
Added in version 0.4 of package koyo-sentry.
1.1 Deprecated API
procedure
((make-sentry-wrapper [ dsn #:client client #:backlog backlog #:release release #:environment environment]) hdl) → (-> request? response?) dsn : (or/c false/c non-empty-string?) = #f client : (or/c false/c sentry?) = #f backlog : exact-positive-integer? = 128 release : (or/c false/c non-empty-string?) = #f environment : (or/c false/c non-empty-string?) = #f hdl : (-> request? response?)
Creates a function that wraps a request handler so that any exceptions
it raises get sent to Sentry and every request is tracked as a Sentry
transaction. When client is provided, all other arguments
are disallowed. Conversely, client may not be provided when
dsn is provided. When either client or dsn
is is #f, hdl is returned unchanged.
Changed in version 0.4 of package koyo-sentry: This procedure is deprecated. Use make-sentry-component instead.