Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Sentrymodule Breadcrumb : sig ... endmodule Client : sig ... endLow level functions to access the Sentry API. You probably want the high level functions in sentry.ml
module Config : sig ... endmodule Context : sig ... endmodule Dsn : sig ... endmodule Event : sig ... endmodule Exception : sig ... endmodule Platform : sig ... endmodule Sdk : sig ... endmodule Severity_level : sig ... endval with_dsn : Dsn.t -> (unit -> 'a) -> 'awith_dsn dsn f overrides the default DSN (from the environment variable SENTRY_DSN) within the execution of f
val with_context : Context.t -> (unit -> 'a) -> 'awith_context f sets the current thread-local context and runs f with it.
val with_new_context : ?tags:(string * string) list -> (Context.t -> 'a) -> 'aLike with_new_context but creates the new context for you as a copy of the current context. ~tags will be merged into the new context.
val add_breadcrumb : Breadcrumb.t -> unitAdd a breadcrumb to the current context
capture_message ?tags ?dsn message uploads a message to Sentry using the given dsn (or looking it up in the environment).
If you pass tags, it will be as if you called with_tags before this function.
capture_exception ?dsn ?message e records the backtrace from e and an optional message and uploads it to Sentry.
If you pass tags, it will be as if you called with_tags before this function.
val capture_error : ?tags:(string * string) list -> Core_kernel.Error.t -> unitcapture_error ?dsn ?message e records the backtrace from e and uploads it to Sentry.
If you pass tags, it will be as if you called with_tags before this function.
with_exn_handler ?dsn f runs f. If f throws an exception, it will be uploaded to Sentry and then re-reraised.
with_exn_handler ?dsn f is like context except exceptions will not be re-raised. Use this if you're using Sentry in a loop where you want to report on errors and then continue (like in an web server).
val with_error_and_exn_handler :
(unit -> 'a Core_kernel.Or_error.t) ->
'a Core_kernel.Or_error.twith_error_and_exn_handler ?dsn f runs f. If f throws an exception or error, it will be uploaded to Sentry and then re-raised or returned. Note that Error.t does not handle backtraces as well as exceptions.
val with_async_exn_handler :
(unit -> 'a Async_kernel.Deferred.t) ->
'a Async_kernel.Deferred.twith_async_exn_handler f runs f. If f throws one or more exceptions, they will be uploaded to Sentry. The first raised exception willl be re-raised (multiple exceptions could be raised to the Async monitor but only one can be re-raised).
val with_async_exn_handler_ignore :
(unit -> unit Async_kernel.Deferred.t) ->
unit Async_kernel.Deferred.tSee with_exn_handler_ignore and with_async_exn_handler
val with_async_error_and_exn_handler :
(unit -> 'a Async_kernel.Deferred.Or_error.t) ->
'a Async_kernel.Deferred.Or_error.twith_async_error_and_exn_handler f runs f. If f throws an exception or returns an error, it will be uploaded to Sentry and then re-raised or returned.